Ex- Continent's Best Player of the Year the Napoli star helped his team establish a 3-0 lead, but they were forced to hold on for a narrow win.
The three-time champions weathered a stunning late rally from Tunisia to progress to the last 16 of the Afcon tournament taking place in the host nation.
The Super Eagles seemed to be cruising in their pool clash in the Moroccan city, enjoying a three-goal cushion with just 17 minutes left courtesy of goals from their attacking trio.
Yet, a Tunisian defender reduced the deficit with a powerful header from a Hannibal Mejbri set-piece, igniting hopes of a recovery.
The tension escalated when the North Africans were awarded a late penalty after a video assistant referee review spotted a handball by Bright Osayi-Samuel. Ali Abdi calmly slotted home in the dying stages to create a nail-biting finale.
Tunisia came agonizingly close from a last-gasp equalizer in stoppage time, with their skipper directing a chance narrowly wide before a substitute guided a half-volley past the goal frame.
The victory ensures that the Super Eagles, winners of the tournament on three previous occasions, advance to six group points and are guaranteed first place in their pool with a match still to play.
In the next round, they will meet a best third-place side from one of Group A, B or F.
In the other match, Tunisia remain on three group points, with Uganda and Tanzania locked on a single point each after registering a one-all stalemate earlier on Saturday.
The concluding group fixtures will see the group leaders remain in the city to play Uganda on Tuesday, while the Eagles of Carthage travel back to the capital to confront Tanzania.
Ali Abdi smashed home from 12 yards to give his team a glimmer of hope of earning a draw.
Nigeria, finalists in the previous tournament, are the next nation after Egypt to qualify for the next phase, but coach Eric Chelle and supporters will undoubtedly be breathing a sigh of relief.
What seemed set to be a straightforward last period transformed into a tense conclusion.
The prolific striker had a goal ruled out for an infringement before breaking the deadlock right before half-time, expertly guiding a glancing effort into the far post from an Atalanta winger delivery.
The lead was doubled soon in the second half when Wilfred Ndidi rose highest to thump in a powerful nod from a set-piece corner.
Osimhen then set up Lookman for the third goal, before Montassar Talbi to direct a header past goalkeeper Stanley Nwabali to initiate the comeback.
The key incident arrived when a looping cross struck the arm of the full-back, with the official pointing to the spot after consulting the VAR monitor.
Despite the defender's successful penalty, Tunisia in the end came up just short of completing a stirring recovery.
Tunisia's destiny is still in their own hands; a draw against Tunisia will be enough to secure progression, and their coach will be keen to avoid a repeat of the past early elimination that led to his departure.