Former African Footballer of the Year the Napoli star helped his team build a 3-0 advantage, but they were forced to defend resolutely for a hard-fought victory.
The three-time champions weathered a dramatic late rally from their opponents to progress to the knockout stage of the 2025 Africa Cup of Nations taking place in Morocco.
Jose Peseiro's side seemed to be in complete control in their Group C encounter in Fes, enjoying a three-goal cushion with only 17 minutes left courtesy of goals from Victor Osimhen, Wilfred Ndidi and Ademola Lookman.
However, a Tunisian defender pulled one back with a powerful header from a Manchester United midfielder set-piece, sparking hopes of a turnaround.
The drama escalated when Tunisia were given a spot-kick after a video assistant referee review identified a handball by Bright Osayi-Samuel. Ali Abdi calmly slotted home in the dying stages to set up a frantic finale.
Tunisia were inches away from a stunning equalizer in stoppage time, with captain Ferjani Sassi heading a opportunity narrowly wide before Ismael Gharbi sent a bobbling volley wide of the goal frame.
Securing Top Spot
This result ensures that Nigeria, champions of the tournament on 3 past instances, advance to six group points and are guaranteed top spot in Group C with one game left to be contested.
For the round of 16, they will face a third-placed team from either Group A, B or F.
Meanwhile, Tunisia remain on 3 group points, with Uganda and Tanzania tied on one point after playing out a 1-1 stalemate in the day's other fixture.
The concluding pool fixtures will see the group leaders remain in the city to take on the Cranes on the next matchday, while the Eagles of Carthage return to the capital to confront the Taifa Stars.
A Nervy Finish
The Tunisian defender drilled the ball from the penalty spot to offer his team hope of earning a point.
Nigeria, finalists in the previous tournament, are the next nation after Egypt to qualify for the next phase, but coach Eric Chelle and supporters will undoubtedly be breathing a sigh of relief.
What seemed set to be a comfortable last period transformed into a tense affair.
Victor Osimhen had a goal ruled out for an infringement before opening the scoring on the stroke of half-time, precisely placing a glancing effort into the bottom corner from an Atalanta winger delivery.
The lead was extended early in the second period when Wilfred Ndidi rose highest to thump in a header from a set-piece corner.
The number 9 then turned provider his teammate for the seemingly decisive goal, before the defender to steer a header past the Nigerian shot-stopper to initiate the comeback.
The pivotal incident came when a looping cross struck the forearm of Bright Osayi-Samuel, with the official awarding a penalty after reviewing the pitchside screen.
Despite the defender's confident conversion, Tunisia in the end fell short of pulling off a stirring comeback.
Their fate is still in their own hands; a point against Tunisia will be sufficient to see them through, and manager Sami Trabelsi will be keen to prevent a repeat of the past group-stage exit that led to his departure.