Lots were drawn to determine second place in Group D after both countries finished level after their three opening round matches. Ivory Coast won the group.
Three successive 1-1 draws for both teams meant they could not be separated by points, their head-to-head result, goal difference or goals scored.
Guinea will now play Ghana in Sunday’s quarter-final in Malabo.
A representative from both countries drew a ball each from a bowl with Mali’s football association president Boubacar Diarra going first and pulling out the one that placed them third in the group and out of the running.
Dabo then drew the ball that confirmed his side in second place behind group winners Ivory Coast.
“Unfortunately we have to split up two teams that are even, perfectly joined, but we had no other choice but to proceed to the drawing of lots,” said CAF president Issa Hayatou at the draw in Equatorial Guinea.
It was only the third time in African Nations Cup history that a draw had to be conducted to separate two teams after the group phase.
Previous drawing of lots in 1972 and 1988 favoured Congo and Algeria.