Mali, Cameroon qualify as Zimbabwe player subbed after 149 seconds
A Demba Diallo goal on 11 minutes gave Mali a 1-0 victory over Zimbabwe in coastal city Douala and first place in Group A with seven points from three matches.
Cameroon, who hope to become the second host nation after Morocco to win the competition for home-based players, drew 0-0 with Burkina Faso to finish runners-up with five points.
Burkina Faso came third with four points while three losses meant Zimbabwe failed to collect even one point for the first time in five appearances at the tournament.
On Saturday, Mali will face the Group B runners-up in Yaounde while Cameroon make a 246-kilometre (153 miles) journey to Douala for a meeting with the Group B winners the same day.
Twice champions the Democratic Republic of Congo top Group B with four points ahead of the final round Monday with Libya (three points), Niger (two) and Congo Brazzaville (one) all in contention.
While the Malians and Cameroonians celebrated advancing to the knockout stage and the Burkinabe lamented missing several scoring chances, Zimbabwean Qadr Amin was the focus of much attention.
When Zimbabwe were awarded a free-kick about 30 metres from Malian goalkeeper Djigui Diarra, Amin stood along designated set-piece specialist Tatenda Tavengwa.
But as Tavengwa prepared to shoot at goal, Amin darted forward and fired the free-kick wide to the apparent fury of Croatia-born Zimbabwe coach Zdravko Logarusic.
With just two minutes and 29 seconds gone in the opening half, the electronic substitutes' board was raised by the fourth official, indicating that Amin would be replaced by Ian Nekati.
A dejected Amin walked off having made unwanted history as the Zimbabwean to spend the least time on the pitch before being substituted in a Nations Championship match.
Logarusic was successful at the last Nations Championship in 2018, guiding outsiders Sudan to third place behind champions Morocco and runners-up Nigeria.
In Yaounde, Burkina Faso needed maximum points to qualify and laid siege to the Cameroonian goalmouth in the early stages without converting several chances.
Mohamed Ouattara should at least have hit the target off a cross instead of firing wide and Ismahila Ouedraogo squandered another good chance to put the Burkinabe ahead.
The misses proved costly as Cameroon shed initial nerves and matched Burkina Faso throughout a lively second half.