The withdrawal of Chad meant all results involving them in the group stage were invalidated, though it still left the Super Eagles two points adrift of Egypt, and one ahead of Tanzania, going into Tuesday's contest.
Nigeria needed a win if they were to overhaul Egypt in the remaining games, but were instead beaten by a single goal from Ramadan Sobhy at the Borg El Arab Stadium in Alexandria.
The result means Nigeria have failed to qualify for the Afcon on three of the last four occasions, with two of those failed qualification campaigns coming under current coach Samson Siasia.
Seven-time champions Egypt, meanwhile, will return to the competition for the first time since winning three back-to-back titles between 2006 and 2010.
Nigeria's premature elimination means a host of Premier League clubs will be not have to do without their star players next January, including the likes of Arsenal's Alex Iwobi, Chelsea's John Obi Mikel, Manchester City's Kelechi Iheanacho and Watford's Odion Ighalo.
There could yet be another favourite who fail to make the 2017 Afcon in Gabon, with South Africa on the brink of failing to qualify following their draw with Cameroon.
WATCH GOALS VIDEO BELOW: