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.
For the record, the Atlas Lions team now managed by Hervé Renard, was qualified in the past to the World Cup in 1970, 1986, 1994, 1998.
Morocco and Tunisia now join Nigeria, Senegal and Egypt as Africa's representatives at next year's FIFA World Cup in Russian Federation.
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.
Rattled Ivory Coast fell further behind as they failed to cut off a corner and Juventus defender Benatia struck a first-time shot into the net.
The "Atlas Lions" are going back to the tournament for the first time since 1998 after finishing with 12 points, having not conceded a goal during the six-match group campaign.
And five minutes later Gbohouo was at fault again as he started to come for Mbark Boussoufa's corner into the box but then backtracked, allowing Medhi Benatia to volley home and double the lead.
For Tunisia, the barren draw they recorded against Libya on Saturday was enough to get them another World Cup ticket after they narrowly missed out at the Brazil 2014 edition.
Tunisia emerged the leaders in Group A, surviving a resilient Libya that shared the spoils of the day with their hosts.
Florent Ibenge's side made hard work of the West Africans, and only opened the scoring in the 62nd minute when Ousmane Sidibe put the ball past his own goalkeeper.
Had Tunisia lost, they would have ceded top place to DR Congo, who finished strongly to overcome Guinea 3-1 at the Stade des Martyrs. Before today's matches, Tunisia had 13 points while DR Congo had 10 points.