The best team were sent home by the best loser of the group stage in what was a knife-edge game which needed the final whistle to settle matters.
Just after the break, Tunisia got on the scoresheet when Msakni's shot caught the Super Eagles' goalie off guard, pity for him as he was unsighted by his defence and before he could reach the ball, it was almost in the net.
After the goal, Eguavoen made several changes including Alex Iwobi. The Everton midfielder was sent off after VAR review showed a more aggressive foul against his opponent.
The best chance for Nigeria came in the 93rd minute when Umar Sadiq got the ball from the side rule pass but he couldn't get it into the net as the ball ran across the face of the post.
Tunisia advance ahead of Nigeria and will face Burkina Faso in the quarterfinals.
Nigeria will now turn attention to Ghana for their World Cup playoffs.
Eguavoen would now have a decision to make, either to hand over to Jose Peseiro or take up the two jobs.