Ex- Continent's Best Player of the Year the Napoli star was instrumental in his team establish a commanding lead, before the Super Eagles were forced to defend resolutely for a hard-fought win.
Nigeria weathered a stunning comeback attempt from their opponents to advance to the last 16 of the Afcon tournament being held in Morocco.
Jose Peseiro's side appeared to be in complete control in their pool encounter in Fes, holding a three-goal lead with just 17 minutes left courtesy of goals from their attacking trio.
Yet, Montassar Talbi pulled one back with a powerful header from a Manchester United midfielder free-kick, sparking hopes of a recovery.
The tension intensified when the North Africans were awarded a spot-kick after a VAR check spotted a handball by the Nigerian defender. Ali Abdi converted in the 87th minute to create a nail-biting conclusion.
The Carthage Eagles came agonizingly close from a last-gasp leveler in added time, with captain Ferjani Sassi heading a chance narrowly wide before a substitute sent a half-volley wide of the goal frame.
Securing Top Spot
The victory means that the Super Eagles, champions of the competition on 3 previous occasions, advance to six points and are assured top spot in their pool with a match still to be contested.
In the next round, they will meet a best third-place team from one of the other preliminary groups.
Meanwhile, the 2004 champions stay on 3 group points, with the East African teams locked on a single point each after playing out a one-all stalemate earlier on Saturday.
The concluding pool fixtures will see the group leaders remain in Fes to play Uganda on Tuesday, while Tunisia travel back to the capital to confront the Taifa Stars.
A Nervy Conclusion
Ali Abdi smashed the ball from 12 yards to offer Tunisia a glimmer of hope of earning a draw.
The Super Eagles, finalists in the previous tournament, are the second team after Egypt to reach the next phase, but coach Eric Chelle and fans will certainly be feeling relieved.
What seemed set to be a comfortable last period transformed into a tense affair.
The prolific striker had a goal disallowed for offside before opening the scoring right before half-time, expertly guiding a glancing effort into the far post from an Atalanta winger delivery.
The lead was extended early in the second half when Wilfred Ndidi climbed above everyone to thump in a header from a set-piece corner.
The number 9 then set up his teammate for the third goal, only for the defender to direct a powerful header past goalkeeper Stanley Nwabali to initiate the fightback.
The pivotal incident arrived when a looping cross hit the arm of Bright Osayi-Samuel, with referee Boubou Traore awarding a penalty after consulting the pitchside screen.
Although Ali Abdi's confident conversion, the 2004 champions ultimately fell short of completing a remarkable recovery.
Their fate remains in their own hands; a draw against Tanzania will be enough to see them through, and their coach will be eager to prevent a repeat of the past early elimination that led to his departure.