The two goals were scored by Victor Moses via penalties, which gave Nigeria a crucial win against Ethiopia.
Moses, 22, opened the scoring from the spot after he was fouled by defender Alula Girma with 10 minutes to go.
Burkina Faso also sailed through at Zambia’s expense, reaching the second round for the first time since it hosted the tournament in 1998 and finishing top of Group C on goal difference.
Both Nigeria and Burkina Faso ended up with five points, but Burkina Faso led the group with goals advantage.
Meanwhile, defending champions Zambia crashed out, having earned only three points from three matches. It played a goalless draw in its last game with Burkina Faso.