Ex- Continent's Best Player of the Year the Napoli star was instrumental in Nigeria build a commanding lead, before they were compelled to defend resolutely for a hard-fought victory.
Nigeria survived a stunning late rally from their opponents to progress to the knockout stage of the Afcon tournament being held in Morocco.
The Super Eagles seemed to be in complete control in their pool encounter in Fes, holding a 3-0 cushion with only a quarter of an hour 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 Hannibal Mejbri free-kick, sparking hopes of a turnaround.
The tension escalated when Tunisia were awarded a spot-kick after a VAR check identified a handling offense by Bright Osayi-Samuel. Ali Abdi converted in the dying stages to create a frantic conclusion.
Tunisia came agonizingly close from a last-gasp leveler in stoppage time, with captain Ferjani Sassi heading a opportunity just past the post before Ismael Gharbi guided a half-volley past the upright.
The victory ensures that Nigeria, champions of the tournament on 3 past instances, move to 6 points and are guaranteed first place in Group C with one game left to play.
For the round of 16, they will meet a third-placed team from one of the other preliminary groups.
Meanwhile, the 2004 champions remain on three points, with Uganda and Tanzania tied on a single point each after playing out a 1-1 stalemate earlier on Saturday.
The concluding group matches will see Nigeria remain in Fes to play Uganda on the next matchday, while Tunisia return to Rabat to face Tanzania.
Ali Abdi drilled the ball from 12 yards to give Tunisia a glimmer of hope of earning a draw.
The Super Eagles, runners-up in the 2023 tournament, are the second nation after Egypt to reach the knockout stage, but their manager and fans will undoubtedly be breathing a sigh of relief.
What looked like set to be a straightforward final quarter morphed into a tense affair.
The prolific striker had a goal disallowed for an infringement before opening the scoring on the stroke of the interval, precisely placing a header into the far post from an Ademola Lookman cross.
The lead was extended soon in the second period when the Leicester City midfielder rose highest to power home a header from a set-piece corner.
Osimhen then set up his teammate for the seemingly decisive goal, only for Montassar Talbi to steer a powerful header past the Nigerian shot-stopper to initiate the comeback.
The pivotal incident came when a looping cross struck the arm of Bright Osayi-Samuel, with referee Boubou Traore awarding a penalty after reviewing the VAR monitor.
Although the defender's successful penalty, the 2004 champions in the end came up just short of pulling off a remarkable recovery.
Tunisia's destiny remains in their own hands; a point against Tanzania will be enough to see them through, and their coach will be keen to prevent a recurrence of the past group-stage exit that led to his previous resignation.
A tech enthusiast and consumer advocate with over a decade of experience testing and reviewing products across various categories.