The vote scheduled for November 7 comes after an outbreak of protests that forced President Heri Rajaonarimampianina to accept the formation of a “consensus” government tasked with organising a fresh poll.
If no candidate receives more than 50% in the first round, a second round of voting will be held on December 19.
Opposition grandees Rajoelina and Ravalomanana were both barred from running in 2013 under a deal designed to bring stability to the impoverished Indian Ocean island.
Madagascar is a former French colony with a population of 25 million that has been beset by political instability for decades.
A standoff erupted over proposed electoral reforms that triggered mass protests and led the Constitutional Court to order a caretaker government to organise the ballot.
Demonstrators took to the capital Antananarivo’s central square in April over Rajaonarimampianina’s efforts to change electoral laws that opponents said were intended to favour his party.
The proposals were overturned by the courts.
But the protests morphed into a full-blown movement to oust Rajaonarimampianina. Clashes between activists and the security forces claimed two lives and left more than a dozen injured.