Former Continent's Best Player of the Year the Napoli star helped his team build a commanding lead, but they were forced to defend resolutely for a narrow win.
The three-time champions weathered a stunning late rally from Tunisia to advance to the last 16 of the Afcon tournament being held in Morocco.
The Super Eagles seemed to be in complete control in their Group C encounter in the Moroccan city, holding a 3-0 lead with only 17 minutes remaining courtesy of strikes from their attacking trio.
Yet, a Tunisian defender reduced the deficit with a powerful header from a Manchester United midfielder set-piece, sparking hopes of a recovery.
The tension intensified when the North Africans were given a spot-kick after a video assistant referee review identified a handball by the Nigerian defender. The left-back calmly slotted home in the 87th minute to create a frantic finale.
Tunisia came agonizingly close from a stunning leveler in stoppage time, with captain Ferjani Sassi heading a chance narrowly wide before a substitute guided a bobbling volley past the upright.
The victory ensures that the Super Eagles, champions of the competition on three past instances, move to 6 points and are assured top spot in Group C with a match still to play.
In the next round, they will face a third-placed side from one of Group A, B or F.
Meanwhile, Tunisia remain on 3 points, with Uganda and Tanzania locked on one point after playing out a 1-1 stalemate in the day's other fixture.
The concluding pool matches will see Nigeria remain in Fes to play Uganda on Tuesday, while the Eagles of Carthage return to Rabat to face the Taifa Stars.
Ali Abdi drilled home from the penalty spot to offer Tunisia a glimmer of hope of snatching a point.
The Super Eagles, runners-up in the previous edition, become the next nation after Egypt to reach the knockout stage, but their manager and supporters will certainly be feeling relieved.
What looked like set to be a straightforward final quarter morphed into a tense affair.
Victor Osimhen had a effort disallowed for an infringement before breaking the deadlock right before half-time, precisely placing a header into the bottom corner from an Atalanta winger cross.
The advantage was extended soon in the second half when Wilfred Ndidi rose highest to thump in a header from a set-piece kick.
Osimhen then set up his teammate for the third goal, only for Montassar Talbi to steer a header past the Nigerian shot-stopper to begin the fightback.
The pivotal moment arrived when a looping cross hit the arm of the full-back, with the official awarding a penalty after reviewing the VAR monitor.
Although the defender's successful penalty, the 2004 champions ultimately came up just short of completing a remarkable recovery.
Their fate remains in their control; a draw against Tanzania will be enough to see them through, and manager Sami Trabelsi will be eager to avoid a repeat of the 2013 group-stage exit that resulted in his previous resignation.
A seasoned financial analyst with over a decade of experience in wealth management and investment consulting, passionate about empowering others.