Morocco is the only team from Group C of the 2021 Africa Cup of Nations remaining in the tournament following the elimination of Ghana, Gabon and Comoros.
The North Africans, Gabon and Comoros all advanced from the Group as the group winners, runner up and one of the best third placed teams respectively.
The Black Stars of Ghana finished bottom of the group with a point having been defeated by Morocco and minnows Comoros.
PSG right back Hakimi Achraf scored a stunning free kick in the 70th minute to put Morocco 2-1 ahead after going down in the 7th minute against Malawi.
For their quarterfinal, the Atlas Lions will now meet the winner of the Ivory Coast – Egypt Round of 16 tie to be played on Wednesday.