Former African Footballer of the Year the Napoli star helped his team establish a 3-0 advantage, before they were compelled to defend resolutely for a narrow win.
The three-time champions survived a dramatic comeback attempt from Tunisia to progress to the knockout stage of the 2025 Africa Cup of Nations being held in Morocco.
The Super Eagles seemed to be in complete control in their Group C encounter in Fes, enjoying a 3-0 cushion with only 17 minutes remaining thanks to strikes from Victor Osimhen, Wilfred Ndidi and Ademola Lookman.
Yet, a Tunisian defender reduced the deficit with a close-range finish from a Manchester United midfielder free-kick, sparking hopes of a recovery.
The drama intensified when Tunisia were given a spot-kick after a video assistant referee check identified a handball by the Nigerian defender. Ali Abdi calmly slotted home in the 87th minute to create a nail-biting finale.
The Carthage Eagles came agonizingly close from a last-gasp leveler in added time, with captain Ferjani Sassi directing a opportunity narrowly wide before Ismael Gharbi sent a bobbling volley wide of the upright.
This result means that Nigeria, champions of the competition on 3 past instances, advance to 6 points and are guaranteed first place in their pool with one game left to be contested.
For the round of 16, they will face a best third-place team from one of Group A, B or F.
In the other match, the 2004 champions remain on 3 points, with the East African teams locked on a single point each after playing out a one-all stalemate in the day's other fixture.
The final pool matches will see Nigeria remain in the city to play Uganda on Tuesday, while Tunisia travel back to Rabat to face the Taifa Stars.
The Tunisian defender smashed the ball from 12 yards to give Tunisia hope of snatching a point.
The Super Eagles, runners-up in the 2023 tournament, become the next nation after the Pharaohs to reach the next phase, but coach Eric Chelle and supporters will undoubtedly be feeling relieved.
What looked like set to be a straightforward final quarter transformed into a nerve-wracking conclusion.
The prolific striker had a goal disallowed for offside before breaking the deadlock right before half-time, expertly guiding a glancing effort into the far post from an Ademola Lookman cross.
The advantage was doubled early in the second period when the Leicester City midfielder climbed above everyone to power home a powerful nod from a set-piece kick.
The number 9 then set up Lookman for the third goal, only for Montassar Talbi to steer a header past the Nigerian shot-stopper to initiate the fightback.
The pivotal moment came when a looping cross struck the arm of the full-back, with referee Boubou Traore pointing to the spot after reviewing the pitchside screen.
Despite the defender's successful penalty, Tunisia in the end fell short of completing a stirring recovery.
Tunisia's destiny is still in their own hands; a draw against Tanzania will be enough to secure progression, and their coach will be keen to prevent a repeat of the 2013 early elimination that led to his departure.