Cote d’Ivoire needed an outright win to qualify while a draw would still have been enough for Morocco.Nabil Dirar put Morocco 1-0 up in the 25th minute before Juventus defender Medhi Benatia doubled their lead in the 30th minute.
Morocco have now qualified for their fifth World Cup (1970, 1986, 1994, 1998) and their first since France 1998.
The North Africans finished top of the group on 12 points while Cote d’Ivoire occupied second position on eight.
In Group A, Tunisia will be making a return to the World Cup since Germany 2006 following a 0-0 home win against Libya in Rades also on Saturday.
Tunisia finished top of the group on 14 points, just one point ahead of second-placed Congo Democratic Republic who defeated Guinea 3-1.
The 2004 African champions have now qualified for their fifth World Cup (1978, 1998, 2002, 2006).
Morocco and Tunisia now join Nigeria, Senegal and Egypt as Africa’s representatives at next year’s FIFA World Cup in Russia.