A delicate chip from Salomon Kalou and a stooping header by Kolo Toure had looked set to ensure a second victory for the Ivorians in Group C.
Kalou chipped the Ivorians into an eighth-minute lead, outsprinting the defence to get on the end of a fine through ball from Siaka Tiene.
Captain Houcine Kharja equalised for Morocco from the penalty spot but Toure put the visitors back in front with a close-range header on the hour.
It was the Manchester City defender's fourth goal for his country on his 98th appearance for the Elephants.
Talismanic captain Didier Drogba, who scored last week when the Ivorians launched their campaign with a 2-0 home win over Tanzania, was a towering presence in attack before being taken off with six minutes left.
Abdourazzouk then grabbed the equaliser with a powerful header, much to the relief of Morocco's Belgian coach Eric Gerets.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.