Morocco have now qualified for their fifth World Cup (1970, 1986, 1994, 1998) and their first since France 1998.
Nigeria, Senegal and Egypt had previously sealed their spots in Russian Federation next year.
Group A leaders Tunisia welcomed Libya to Rades, a short distance from capital Tunis, knowing a loss could see them miss out if second-placed DR Congo beat Guinea elsewhere.
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.
Cote d'Ivoire needed an outright win to qualify while a draw would still have been enough for Morocco.
Ivory Coast, meanwhile, failed to qualify for the quadrennial tournament after making it to the competition's finals for three times in a row in 2006, 2010 and 2014.More news: UCLA's LiAngelo Ball, two others released after arrest in China
Ivory Coast was already in decline after being eliminated by Renard and Morocco in the group stage of this year's African Cup, where the Ivorians were defending champions.
Nabil Dirar eventually opened the scoring for the Lions of the Atlas on 25 minutes with a long range effort that found the bottom corner, 0-1.
With second-place Democratic Republic of Congo netting twice in stoppage time to defeat Guinea 3-1 in Kinshasa, only one point separated the top two.
Ibenge's side will look back at their double header against the Tunisians, when they enjoyed the better of both contests but only took one point out of a possible six, as the reason why they will be watching on from the outside next summer.
Immediately after Morocco's national team secured it qualification to the 2018 World Cup in Russia, Moroccans of NY flocked to Steinway street in Astoria to celebrate this victory.