This victory gives them a five-point lead in Group I with four matches left, and they'll face Chad away in September.
Madagascar, despite the loss, holds second place in the group, with coach Corentin Martins aiming to bounce back against the Central African Republic in the next round.
Thomas Partey scored twice, and Andre Ayew added another to give Ghana a comfortable win.
Burkina Faso kept their hopes alive with a 2-1 away win over Guinea-Bissau. Lassina Traore netted twice, including an early goal, while Guinea-Bissau's Zidane Banjaqui scored one, but it wasn't enough.
Liberia climbed to third in Group H after a 2-1 win over Sao Tome and Principe. Nicholas Andrews and Jimmy Farkalun's goals secured the win, keeping Liberia within three points of leaders Tunisia.
Mali dropped points in their 0-0 draw with Cameroon in Casablanca, staying third in Group I. The Central African Republic is fifth.
Namibia stayed unbeaten in Group H with a 1-1 draw against Equatorial Guinea. Peter Shalulile scored for Namibia, while Saul Coco equalized. Namibia remains just behind Tunisia in second.
Ivory Coast edged Gambia 1-0, with Sebastien Haller's first-half goal proving decisive. The win keeps Ivory Coast top of the group, one point ahead of Gabon.
Tunisia sealed a 2-0 win over Malawi with late goals from Seifeddine Jaziri (86th minute) and Elias Achouri (stoppage-time penalty). The victory extended their lead to four points over second-place Namibia.
Ethiopia thrashed Djibouti 6-1, with Bereka Desta and Abubeker Nassir both scoring hat-tricks. The win boosted Ethiopia to fourth in Group A, though they remain seven points behind Egypt.
With the qualifiers nearing their end, Tunisia and Ethiopia revived their World Cup hopes with crucial victories.