Achraf Hakimi and debutant Imran Louza in the first half and Ilias Chair, Ayoub El Kaabi and Munir El Haddadi netted for the Moroccans, who are chasing a sixth appearance at the global showpiece.
But the convincing Group I win for the Atlas Lions in the top-of-the-table clash was overshadowed by the Guinea-Bissau medical drama, which affected 25 players and technical staff.
Guinea-Bissau delegation head Carlos Teixeira had temporarily threatened to boycott the match, saying "I will not send the players to the field - it would be a criminal act on my part".
Head coach Baciro Cande said players and coaches "developed stomach aches about 15 minutes after dinner, followed by diarrhoea and vomiting.
"Twenty-five were taken to hospital and released just before dawn on Wednesday. As a precaution, we then brought our own food to the hotel."
The pre-match drama took some gloss off an impressive performance by Morocco under veteran coach Vahid Halilhodzic.
Morocco have six points, Guinea-Bissau four, Guinea two and Sudan one in a section badly disrupted by a lack of international-standard stadiums and security issues.
Guinea-Bissau and Sudan have been forced to stage home fixtures in Morocco due to sub-standard stadia and Guinea are currently barred from hosting qualifiers after a coup last month.
Morocco triumphed despite the absence of several stars, including Sevilla forward Youssef En-Nesyri and Chelsea midfielder Hakim Ziyech.
Consistent scorer En-Nesyri is injured while Ziyech was dropped because of "unacceptable behaviour" during mid-year World Cup warm-up matches.
Halilhodzic told reporters that Ziyech had arrived late for friendlies against Ghana and Burkina Faso, displayed a bad attitude, and the medical staff said the midfielder had feigned injury.
Guinea, who had been expected to pose the greatest threat to Morocco, could only draw 1-1 with Sudan in Marrakech.
Mohamed Bayo, who scored for Clermont in the French Ligue 1 at the weekend, took his scoring habit to north Africa by nodding Guinea in front off a second-half corner.
Saifeldin Bakhit equalised 18 minutes from time with a close-range shot to earn Sudan a first point in the group.
October 6, 2021