Ex- Continent's Best Player of the Year the Napoli star helped Nigeria build a 3-0 advantage, before the Super Eagles were forced to hold on for a hard-fought win.
The three-time champions survived a stunning comeback attempt from their opponents to progress 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 Fes, holding a 3-0 cushion with only a quarter of an hour left courtesy of strikes from their attacking trio.
Yet, a Tunisian defender pulled one back with a powerful header from a Hannibal Mejbri set-piece, igniting hopes of a recovery.
The drama escalated when Tunisia were given a late penalty after a VAR check spotted a handball by the Nigerian defender. Ali Abdi calmly slotted home in the 87th minute to set up a frantic conclusion.
Tunisia were inches away from a last-gasp leveler in stoppage time, with captain Ferjani Sassi directing a chance just past the post before a substitute sent a half-volley past the upright.
Securing First Place
This result means that the Super Eagles, champions of the tournament on three past instances, advance to 6 group points and are assured first place in Group C with one game still to play.
For the round of 16, they will meet a best third-place side from one of Group A, B or F.
In the other match, Tunisia stay on 3 points, with the East African teams locked on a single point after registering a 1-1 draw earlier on Saturday.
The final pool fixtures will see the group leaders remain in the city to play the Cranes on the next matchday, while Tunisia travel back to the capital to confront the Taifa Stars.
An Anxious Finish
Ali Abdi drilled home from 12 yards to give Tunisia hope of earning a point.
Nigeria, runners-up in the previous edition, are the second nation after the Pharaohs to reach the knockout stage, but their manager and supporters will undoubtedly be feeling relieved.
What looked like set to be a straightforward last period morphed into a tense conclusion.
The prolific striker had a goal disallowed for an infringement before breaking the deadlock on the stroke of half-time, expertly guiding a glancing effort into the far post from an Atalanta winger cross.
The advantage was extended early in the second period when Wilfred Ndidi climbed above everyone to power home a powerful nod from a set-piece kick.
The number 9 then turned provider his teammate for the third goal, before Montassar Talbi to direct a powerful header past goalkeeper Stanley Nwabali to begin the fightback.
The pivotal moment came when a looping cross hit the forearm of Bright Osayi-Samuel, with referee Boubou Traore pointing to the spot after reviewing the pitchside screen.
Despite Ali Abdi's confident conversion, Tunisia ultimately came up just short of pulling off a stirring recovery.
Tunisia's destiny remains in their control; a draw against Tanzania will be sufficient to secure progression, and manager Sami Trabelsi will be keen to avoid a repeat of the 2013 group-stage exit that led to his previous resignation.