Adam Ounas’ brace and Islam Slimani’s effort helped the Desert Foxes end the group stage with the maximum of nine points from three games, thus, condemning Emmanuel Amuneke’s men to their third defeat in the tournament.
Amuneke handed starting roles to many of the players which featured in their 3-2 defeat to Kenya, including captain Mbwana Samata.
Rais M'Bolhi maintained his position in goal while Djamel Belmadi rested many of his side which defeated Senegal last time out, including Manchester Cty’s Riyad Mahrez, Baghdad Bounedjah and Sofiane Feghouli, preferring to start Islam Slimani and Andy Delort in attack.
The Desert Foxes had the first clear chance in the encounter when Delort found Hichem Boudaoui in the third minute but the 19-year-old sent his effort wide of the target.
Algeria had another opportunity to open the scoring in the seventh minute but Slimani failed to beat onrushing Tanzania goalkeeper Metacha Mnata.
In the 16th minute, Ismael Bennacer launched a powerful shot from inside the box but Mnata blocked the effort as Algeria continued pushing for the opening goal.
Slimani eventually broke the deadlock in the 35th minute to send the Algerian fans in the stadium into wild jubilation. The Fenerbahce man calmly slotted in the ball past Mnata after he was played through on goal by Adam Ounas.
Algeria continued to dominate the game and added the second goal four minutes later through Ounas with Slimani providing the assist.
The Napoli midfielder, Ounas completed his brace in the 45th minute, rounding goalkeeper Mnata after he was set up by Slimani.
In an attempt to turn things around for his side, Amuneke introduced Adi Yussuf for Farid Mussa at the start of the second-half, and the change almost had an immediate effect when Yussuf directed his shot on target but failed to trouble goalkeeper M'Bolhi.
Both sides made changes in the second-half. David Mwantika was replaced by Himid Mkami for Tanzania while coach Belmadi introduced Ismael Bennacer for Adlene Guedioura.
Ounas made way for Riyad Mahrez while Mehdi Abeid was substituted for Baghdad Bounedjah as Algeria held on to their first-half lead.
John Bocco who came in for Feisal Salum had a chance to score a consolation goal for Tanzania but side-netted the effort.
The loss means the Taifa Stars will continue their long wait for their first Africa Cup of Nations victory.