Tunisia qualified for the 2018 World Cup in Russian Federation despite being held 0-0 at home by Libya in their final Group A qualifier.
Tunisia also qualified on Saturday after drawing 0-0 with Libya.
Morocco needed only a draw in their last group game to finish top of the standings ahead of the Ivorians, who had to win to clinch a place in Russian Federation.
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.
Marc Wilmots' Ivory Coast needed a win at home to qualify for their fourth consecutive World Cup, but two errors by goalkeeper Sylvain Gbohouo put chances of victory out of reach in the first half.
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. But it was the Moroccans who got the breakthrough when Nabil Dirar's cross evaded everyone and found its way it to the net.
Tunisia survived some nervous moments in Rades as Libya finished strongly.
Tunisia finished on 14 points in Group A of the African preliminaries, one ahead of the Democratic Republic of Congo, who fell short despite a 3-1 win over Guinea in Kinshasa at the same time.
Serge Aurier had the best chance to score for Ivory Coast in the second half, but he skied his shot over the bar, and Morocco maintained their record of not conceding a single goal in the six games in CAF qualifying Group C.