The much-changed Group D leaders were trailing thanks to second-half goals from Sofiane Feghouli and Hilal Soudani, but were saved by late efforts from captain Drogba and Wilfred Bony.
The Ivorians controlled the early stages but conceded a penalty on six minutes after defender Ismael Traore impeded Islam Slimani on the edge of the box.
Yet Ryad Boudebouz could only continue Algeria’s wretched attacking form as his confidently-struck penalty hit Daniel Yeboah’s right post.
The Elephants’ first chance came through Salomon Kalou on the quarter-hour mark – the former Chelsea man brought down a deflected ball and passed a defender before firing over the bar.
Kalou was wasteful in attack once more on 19 minutes – put through in a wide position by Bony, his shot harmlessly cannoned off defender Essaid Belkalem.
The Algerians continued to threaten, with Soudani cutting into the box from the left wing with half an hour played, only to drag his shot across the face of goal.
Algeria started the second half the brighter – Ryad Boudebouz’s 48th minute free-kick was flicked onto Belkalem at the far post, only for the defender to head straight at Yeboah.
And the Fennec Foxes finally broke the deadlock on 63 minutes, as Ivorian full-back Arthur Boka gifted them a penalty by handling in the box.
Substitute Sofiane Feghouli stepped in to succeed where Boudebouz failed, smashing an authoritative spot kick high into the net.
And Feghouli turned provider seven minutes later, providing a perfect cross from the wing for the onrushing Soudani to head in.
But Drogba threw his side a lifeline on 77 minutes, leaping into the air to head in a hopeful down-field ball from 12-yards out.
The Ivorians then levelled the score three minutes later, Bony’s driven shot taking a massive deflection off Djemal Mesbah before looping over the unfortunate M’Bolhi.
Having already qualified from the group before today’s game, the Ivory Coast now face Nigeria in the quarter-finals.
MORE: Latest Man Utd news
MORE: Latest Arsenal news
MORE: The latest football news