Former Continent's Best Player of the Year Victor Osimhen was instrumental in his team build a commanding lead, before they were forced to hold on for a narrow victory.
The three-time champions survived a dramatic comeback attempt from their opponents to advance to the last 16 of the 2025 Africa Cup of Nations taking place in the host nation.
Jose Peseiro's side seemed to be cruising in their pool clash in Fes, enjoying a 3-0 lead with only a quarter of an hour remaining courtesy of goals from their attacking trio.
Yet, Montassar Talbi pulled one back with a close-range finish from a Hannibal Mejbri free-kick, sparking hopes of a recovery.
The drama escalated when the North Africans were given a late penalty after a VAR check spotted a handling offense by Bright Osayi-Samuel. Ali Abdi converted in the dying stages to create a nail-biting conclusion.
Tunisia came agonizingly close from a stunning leveler in added time, with their skipper heading a opportunity just past the post before Ismael Gharbi guided a half-volley wide of the goal frame.
Securing Top Spot
This result ensures that Nigeria, champions of the competition on 3 past instances, advance to six points and are assured top spot in Group C with one game left to play.
For the round of 16, they will face a third-placed team from either the other preliminary groups.
In the other match, the 2004 champions remain on 3 group points, with the East African teams locked on one point each after registering a one-all draw in the day's other fixture.
The concluding group fixtures will see the group leaders remain in the city to play Uganda on Tuesday, while Tunisia travel back to the capital to face Tanzania.
A Nervy Conclusion
Ali Abdi drilled the ball from 12 yards to give his team hope of snatching a draw.
The Super Eagles, runners-up in the 2023 tournament, are the next nation after the Pharaohs to reach the next phase, but coach Eric Chelle and supporters will undoubtedly be feeling relieved.
What looked like set to be a straightforward last period morphed into a nerve-wracking conclusion.
The prolific striker had a effort disallowed for an infringement before opening the scoring on the stroke of half-time, precisely placing a header into the bottom corner from an Ademola Lookman cross.
The lead was extended early in the second period when the Leicester City midfielder rose highest to power home a header from a set-piece corner.
Osimhen then turned provider his teammate for the seemingly decisive goal, before the defender to steer a powerful header past goalkeeper Stanley Nwabali to initiate the fightback.
The key incident arrived when a high ball hit the arm of Bright Osayi-Samuel, with referee Boubou Traore awarding a penalty after reviewing the pitchside screen.
Despite the defender's successful penalty, Tunisia ultimately came up just short of pulling off a stirring comeback.
Their fate is still in their own hands; a draw against Tunisia will be sufficient to secure progression, and manager Sami Trabelsi will be eager to avoid a repeat of the 2013 group-stage exit that resulted in his departure.