President Michel Djotodia caved in to international pressure after failing to halt inter-religious violence.
As news from the summit reached the capital, thousands of residents took to the streets, dancing, singing and honking horns in celebration.
Cheers erupted at a camp for 100,000 displaced Christian civilians at the French-controlled airport.
A displaced man said that people were happy with the resignation but remained concerned over their security.
“A lot of worries because you still have people from rebels who have weapons. What is sure is that if the safety of the civilian population is not guaranteed, there will still be some harm being done, as we have seen lately,” said the man, who gave his name as Armand.
There was some sporadic gunfire but there were no signs of the pro-Djotodia fighters who once dominated the city.
The resignation of Djotodia and his Prime Minister, Nicolas Tiangaye, was announced in a statement issued by regional leaders at a two-day summit in neighbouring Chad.
Talks to decide on new leadership will take place in Central African Republic, it said.