Former Continent's Best Player of the Year the Napoli star helped Nigeria build a 3-0 advantage, before they were forced to defend resolutely for a narrow victory.
Nigeria survived a dramatic late rally from their opponents to advance to the last 16 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 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 turnaround.
The tension escalated when the North Africans were awarded a late penalty after a VAR review spotted a handball by Bright Osayi-Samuel. Ali Abdi converted in the dying stages to set up a nail-biting conclusion.
The Carthage Eagles came agonizingly close from a stunning equalizer in added time, with captain Ferjani Sassi heading a chance just past the post before a substitute guided a bobbling volley wide of the upright.
Clinching First Place
This result means that the Super Eagles, winners of the tournament on three past instances, advance to six points and are guaranteed top spot in their pool with a match left to be contested.
For the round of 16, they will face a third-placed side from either Group A, B or F.
In the other match, the 2004 champions stay on 3 group points, with Uganda and Tanzania tied on one point after registering a one-all draw earlier on Saturday.
The concluding pool matches will see the group leaders remain in the city to play the Cranes on the next matchday, while Tunisia return to the capital to face Tanzania.
A Nervy Conclusion
Ali Abdi smashed the ball from the penalty spot to give his team hope of earning a point.
Nigeria, runners-up in the 2023 edition, are the next team after the Pharaohs to reach the knockout stage, but coach Eric Chelle and fans will undoubtedly be feeling relieved.
What looked like set to be a straightforward final quarter morphed into a nerve-wracking affair.
The prolific striker had a goal ruled out for an infringement before opening the scoring on the stroke of half-time, expertly guiding a glancing effort into the far post from an Atalanta winger cross.
The lead was extended early in the second period when the Leicester City midfielder climbed above everyone to power home a powerful nod from a set-piece corner.
Osimhen then set up his teammate for the seemingly decisive goal, only for the defender to direct a powerful header past goalkeeper Stanley Nwabali to initiate the fightback.
The key incident arrived when a high ball struck the arm of Bright Osayi-Samuel, with referee Boubou Traore pointing to the spot after consulting the pitchside screen.
Although Ali Abdi's confident conversion, Tunisia in the end fell short of completing a remarkable recovery.
Their fate is still in their control; a draw against Tanzania will be sufficient to secure progression, and their coach will be eager to prevent a repeat of the 2013 group-stage exit that led to his previous resignation.