Ghana defeat Morocco 2-0 on Monday to finish top of Group A with nine points after three straight wins.
Guinea were held 1-1 by Namibia but the DRAW was enough to secure their qualification in second place with four points.
Morocco disappointed after winning their opening game 5-1, finishing with three points and failing to qualify from their group for the second successive Nations Cup.
Namibia were on the wrong end of the 5-1 hammering by the Atlas Eagles but responded well, narrowly losing to Ghana and then drawing with Guinea.
Ghana will play west African rivals Nigeria in Accra on Sunday, 3 February, while Guinea face Ivory Coast at the Sekondi Sports Stadium on the same day.