Already eliminated Malawi held qualified Morocco to a goalless draw in their final Group B game in 2019 Africa Cup of Nations qualifying.
Some of Morocco’s best chances fell to Rashid Alioui who hit the woodwork on three occasions.
Morocco coach Herve Renard also gave a debut to Oussama Idrissi just days after the Netherlands-born winger was cleared by Fifa to swap national allegiances.
The other game in the group is on Saturday and sees Cameroon face visiting Comoros to decide who will be playing in the finals.
A draw for former hosts Cameroon will be enough for them to advance, while victory for Comoros will see them clinch second place thanks to a better head-to-head record with the Indomitable Lions.
In Group A Equatorial Guinea finished their campaign with a resounding 4-1 win over Sudan, in a match between two sides already out of contention for the Nations Cup finals.
The hosts started well when Mohamed Mokhtar was on target after 15 minutes.
The lead lasted just four minutes before former Middlesbrough and Mallorca player Emilio Nsue equalised from the spot and added another penalty before half-time.
Spain-born Pablo Ganet, who plays in the Spanish third division for Algeciras, added a third goal four minutes into the second half.
The win was completed when West Ham midfielder Pedro Obiang scored his first goal for the Nzalang Nacional in the 85th minute.
Senegal host Madagascar on Saturday in the other Group A encounter with both sides having already qualified for the finals in Egypt.