Nigeria, Senegal and Egypt had previously sealed their spots in Russian Federation next year.
Needing only a draw to qualify for next year's Russian Federation finals, two first-half goals from Nibal Dirar and Juventus defender Mehdi Benatia ensured the Atlas Lions a World Cup spot.
A mouth-watering clash lay in store in Abidjan, where Côte d'Ivoire hosted Morocco, with the victor booking a ticket to Russian Federation 2018.
Morocco, who completed their qualifying campaign with maximum points and no goals conceded, last appeared in a World Cup in 1998 in France.
North African nations Morocco and Tunisia took contrasting routes Saturday as they qualified for the 2018 World Cup in Russian Federation.
That result eliminated the Ivorians from the tournament in Russian Federation in 2018, while Tunisia also qualified at the expense of DR Congo.
They endured a scare when Gervinho missed a good chance for the hosts but Nabil Dirar's cross evaded keeper Sylvain Gbohouo in the 25th minute to put the guests in front.
The Atlas Lions then doubled their lead just five minutes later through captain Mehdi Benatia's neat finish off a corner, ensuring Herve Renard's men finished top of Group C.
It was unspectacular, but it got the job done and ultimately progressed with a one-point buffer after a late flurry helped DR Congo beat Guinea 3-1 in the group's other match.
After weathering an early storm, including a potential penalty call, Morocco scored two goals in the space of five minutes.
Guinea's Ousmane Sidibe headed into his own net while defending a set piece after the hour mark, but the visitors were able to equalise 10 minutes later when Keita Karamokoba pounced on a loose ball and flicked it over DR Congo goalkeeper Ley Matampi.