A victory for Tunisia, who boasted a two-point advantage over Nigeria before Saturday's matches, was enough to give them the Group B ticket for the World Cup.
However, Mozambique shattered their hopes seven minutes from time, thanks to a goal from South Africa-based striker Dario.
Tunisia finished second in the group with 11 points, one behind leaders Nigeria who secured a late away victory over Kenya.
Strike duo Obafemi Martins and Yakubu Aiyegbeni struck home in a three-minute spell in the second half to put Nigeria ahead after Kenya took the lead through Dennis Oliech after 16 minutes.
Kenya's Allan Wetende leveled the score on 78 minutes but Wolfsburg striker Martins scored his second of the night five minutes later to hand Nigeria an invaluable win.
The Super Eagles, who will make their fourth World Cup appearance in history, missed out on the 2006 edition in Germany.