Former African Footballer of the Year the Napoli star was instrumental in Nigeria build a commanding lead, but the Super Eagles were forced to defend resolutely for a hard-fought win.
The three-time champions survived a dramatic comeback attempt from their opponents to progress to the last 16 of the Afcon tournament being held in the host nation.
The Super Eagles seemed to be in complete control in their Group C encounter in Fes, enjoying a three-goal lead with only 17 minutes left courtesy of strikes from Victor Osimhen, Wilfred Ndidi and Ademola Lookman.
Yet, a Tunisian defender pulled one back with a powerful header from a Manchester United midfielder free-kick, igniting hopes of a recovery.
The tension intensified when the North Africans were given a spot-kick after a VAR review spotted a handball by the Nigerian defender. The left-back converted 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 directing a opportunity narrowly wide before a substitute guided a half-volley past the upright.
This result means that the Super Eagles, winners of the tournament on 3 previous occasions, advance to six points and are assured top spot in their pool with one game left to play.
In the next round, they will meet a best third-place team from one of Group A, B or F.
Meanwhile, Tunisia remain on three points, with the East African teams locked on a single point each after registering a 1-1 draw earlier on Saturday.
The final group matches will see the group leaders remain in Fes to play Uganda on the next matchday, while the Eagles of Carthage travel back to the capital to confront the Taifa Stars.
The Tunisian defender smashed the ball from 12 yards to give his team a glimmer of hope of earning a draw.
The Super Eagles, finalists in the previous edition, become the next nation after the Pharaohs to reach the next phase, but coach Eric Chelle and fans will undoubtedly be feeling relieved.
What looked like set to be a straightforward last period transformed into a tense conclusion.
Victor Osimhen had a goal ruled out for offside before opening the scoring right before half-time, precisely placing a header into the far post from an Atalanta winger cross.
The lead was extended early in the second period when the Leicester City midfielder rose highest to power home a header from a Lookman corner.
Osimhen then turned provider his teammate for the third goal, before the defender to steer a powerful header past the Nigerian shot-stopper to initiate the fightback.
The key incident arrived when a high ball hit the arm of the full-back, with referee Boubou Traore pointing to the spot after reviewing the pitchside screen.
Despite the defender's confident conversion, Tunisia ultimately came up just short of pulling off a stirring recovery.
Their fate is still in their control; a draw against Tunisia will be sufficient to see them through, and manager Sami Trabelsi will be eager to prevent a recurrence of the 2013 early elimination that resulted in his previous resignation.
Lena is a digital design expert with over a decade of experience in UI/UX and creative technology, passionate about sharing innovative design solutions.