Morocco joins Tunisia, Egypt, Senegal and Nigeria as Africa's five representatives in Russian Federation.
Tunisia qualified for the World Cup after winning the group with 14 points.
Led by coach Hervé Renard, the Moroccan squad maintained an upbeat performance completing the qualifications without conceding a single goal making it to the World Cup since their last appearance in 1998.
First half goals from Fenerbahçe right-back Nabil Dirar and Juventus centre-back Medhi Benatia helped Morocco beat Ivory Coast 2-0 on Saturday in a highly-temperamental Group C final World Cup qualifier in Abidjan and seal one of Africa's final two slots for next year's World Cup in Russian Federation.
The Eagles of Carthage headed into their final fixture knowing that they would definitely reach the World Cup if they avoided defeat, but were frustrated by their neighbours.
African champions Cameroon also secured a 2-2 draw away to Zambia in their inconsequential final Group B World Cup qualifier in Ndola thanks to a late goal from defender Yaya Banana.
But after weathering an early storm, including a potential penalty call, Morocco scored two goals in the space of five minutes to put themselves on their way to the finals, in which they last appeared in 1998, in France.
Tunisia's point ensures their fifth World Cup participation - and their first since 2006 - but ensures that the Democratic Republic of Congo's wait to return to the global showpiece for the first time since 1974 will continue.
Both teams needed a point to qualify for the global soccer phenomenon which will be hosted by Russian Federation.
Tunisia survived some nervous moments in Rades as Libya finished strongly.