Riyad Mahrez scored the winning goal for the Desert Foxes in additional time after Odion Ighalo’s effort had cancelled out William Troost-Ekong’s own goal.
Gernot Rohr stuck to the team that defeated South Africa in the quarter-final, with Samuel Chukwueze, who found the back of the net against Bafana Bafana starting his second game in the tournament.
On the other hand, Djamel Belmadi replaced Youcef Attal, who suffered a fractured collarbone against Ivory Coast with Mehdi Zeffane while Baghdad Bounedjah spearheaded the Desert Foxes’ attack.
Having met eight times previously in the biennial tournament with a balanced record of three wins for each side and two draws, both sides were eager to outwit each other at Cairo International Stadium and the Super Eagles were the first to get close to scoring through Oghenekaro Etebo’s free-kick.
Algeria had a wonderful chance in the eighth minute when Youcef Belaili crossed the ball into the area but Bounedjah missed the target.
The Desert Foxes were awarded a free-kick in the quarter-half-hour mark after Chidozie Awaziem fouled Belaili. Ismael Bennacer delivered a fine cross into the area but Ramy Bensebaini’s header flew off the crossbar.
Algeria continued to dominate possession, dictating the pace in the early minutes of the encounter but failed to get a reward for their effort.
Nigeria goalkeeper Daniel Akpeyi made a fine save from Bounedjah moments before the half-hour mark after the Al Sadd striker stole the ball from Kenneth Omeruo.
Chukwueze had a chance to open the scoring for the Super Eagles in the 31sst minute but his free-kick was well dealt with by goalkeeper Rais M'Bolhi.
Algeria finally broke the deadlock in the 40th minute when Troost-Ekong turned Mahrez’s cross into the back of his own net.
After the restart, the Desert Foxes continued to dominate the game with Sofiane Feghouli trying a shot on goal but his effort went off target.
Oghenekaro Etebo fired a long-range effort which was blocked by Aissa Mandi, however, after referee Bakary Papa Gassama consulted with the VAR, Mandi was adjudged to have handled the ball in his area.
The Super Eagles were awarded a penalty and Odion Ighalo dispatched his effort from the spot to bring the Super Eagles back into contention.
Nigeria coach Gernot Rohr introduced Galatasaray forward Henry Onuekuru for Chukwueze in the 78th minute as the Super Eagles searched for the winning goal.
In additional time, Manchester City winger Mahrez scored the decisive goal with a well-taken free-kick to help the Desert Foxes into the final.
The Desert Foxes will slug it out with Senegal in the final of the continental competition at Cairo International Stadium on Friday.