Ex- African Footballer of the Year the Napoli star helped his team build a 3-0 lead, but the Super Eagles were forced to hold on for a narrow victory.
The three-time champions 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 appeared to be cruising in their pool clash in Fes, enjoying a 3-0 lead with only 17 minutes remaining thanks to goals from their attacking trio.
Yet, Montassar Talbi pulled one back with a powerful header from a Hannibal Mejbri set-piece, sparking hopes of a recovery.
The tension intensified when the North Africans were awarded a spot-kick after a VAR review identified a handling offense by Bright Osayi-Samuel. Ali Abdi calmly slotted home in the dying stages to create a nail-biting conclusion.
Tunisia came agonizingly close from a last-gasp equalizer in stoppage time, with their skipper directing a opportunity just past the post before Ismael Gharbi guided a half-volley past the upright.
Clinching First Place
This result means that the Super Eagles, champions of the tournament on three past instances, move to 6 points and are guaranteed first place in their pool with a match left to play.
In the next round, they will meet a third-placed side from one of the other preliminary groups.
Meanwhile, Tunisia remain on 3 points, with Uganda and Tanzania locked on a single point after playing out a one-all draw in the day's other fixture.
The concluding group fixtures will see Nigeria remain in the city to play the Cranes on Tuesday, while Tunisia travel back to Rabat to confront the Taifa Stars.
An Anxious Finish
The Tunisian defender smashed the ball from 12 yards to give his team hope of snatching a draw.
The Super Eagles, runners-up in the 2023 edition, are the second nation after Egypt to qualify for the knockout stage, but coach Eric Chelle and supporters will certainly be breathing a sigh of relief.
What looked like set to be a comfortable final quarter transformed into a tense conclusion.
Victor Osimhen had a effort disallowed for an infringement before opening the scoring on the stroke of half-time, precisely placing a header into the far post from an Ademola Lookman cross.
The advantage was doubled early in the second period when Wilfred Ndidi rose highest to power home a header from a set-piece kick.
The number 9 then set up Lookman for the seemingly decisive goal, before Montassar Talbi to steer a powerful header past the Nigerian shot-stopper to begin the comeback.
The pivotal incident arrived when a looping cross hit the arm of Bright Osayi-Samuel, with the official awarding a penalty after reviewing the pitchside screen.
Although Ali Abdi's confident conversion, Tunisia in the end fell short of completing a remarkable comeback.
Their fate is still in their control; a point against Tunisia will be sufficient to secure progression, and manager Sami Trabelsi will be eager to avoid a recurrence of the 2013 group-stage exit that resulted in his departure.