Former African Footballer of the Year the Napoli star helped Nigeria build a 3-0 advantage, before the Super Eagles were forced to defend resolutely for a hard-fought victory.
Nigeria weathered a stunning late rally from Tunisia to progress to the last 16 of the 2025 Africa Cup of Nations taking place in the host nation.
The Super Eagles appeared to be cruising in their Group C encounter in Fes, holding a 3-0 lead with just 17 minutes remaining courtesy of strikes from Victor Osimhen, Wilfred Ndidi and Ademola Lookman.
However, Montassar Talbi reduced the deficit with a close-range finish from a Hannibal Mejbri free-kick, igniting hopes of a recovery.
The tension intensified when Tunisia were awarded a late penalty after a VAR check spotted a handball by Bright Osayi-Samuel. Ali Abdi converted in the dying stages to create a nail-biting conclusion.
Tunisia came agonizingly close from a last-gasp leveler in stoppage time, with their skipper directing a chance just past the post before Ismael Gharbi sent a bobbling volley past the goal frame.
This result ensures that Nigeria, winners of the competition on three past instances, move to six points and are assured top spot in their pool with a match left to be contested.
In the next round, they will meet a third-placed team from one of Group A, B or F.
Meanwhile, Tunisia remain on three group points, with the East African teams locked on one point after registering a one-all stalemate earlier on Saturday.
The concluding pool fixtures will see the group leaders stay in the city to play Uganda on Tuesday, while Tunisia travel back to the capital to face Tanzania.
Ali Abdi smashed home from 12 yards to offer Tunisia hope of earning a point.
The Super Eagles, runners-up in the 2023 tournament, are the next nation after the Pharaohs to qualify for the knockout stage, but coach Eric Chelle and supporters will undoubtedly be breathing a sigh of relief.
What looked like set to be a comfortable final quarter morphed into a tense affair.
Victor Osimhen had a effort ruled out for offside before breaking the deadlock on the stroke of the interval, precisely placing a glancing effort into the far post from an Atalanta winger cross.
The advantage was doubled soon in the second half when Wilfred Ndidi rose highest to thump in a header from a set-piece kick.
Osimhen then turned provider Lookman for the seemingly decisive goal, only for Montassar Talbi to steer a header past goalkeeper Stanley Nwabali to begin the comeback.
The pivotal moment came when a looping cross struck the forearm of Bright Osayi-Samuel, with referee Boubou Traore pointing to the spot after reviewing the pitchside screen.
Although Ali Abdi's confident conversion, Tunisia in the end fell short of pulling off a remarkable recovery.
Tunisia's destiny is still in their own hands; a point against Tunisia will be enough to see them through, and manager Sami Trabelsi will be keen to avoid a repeat of the past early elimination that resulted in his previous resignation.