Prime minister Nicolas Tiengaye also resigned at the meeting in Chad.
Thousands of people took to the streets in CAR’s capital, Bangui, most of them celebrating the news.
Mr Djotodia, CAR’s first Muslim leader, seized power last year. Since then 20% of the population have fled fighting between Christian and Muslim militias.
Since December and the arrival of more regional peacekeepers and French troops, 1,000 people have died in sectarian clashes.
Many villages are deserted and in the past month the number of those who have fled their homes has doubled – including almost half of those living in the capital, Bangui.
Following the announcement from Chad, there were jubilant scenes in Bangui.
Carine Gbegbe, who has been living in a displacement camp, told Associated Press: “Finally we are free. We are going to return home at last.”
French tanks were quickly deployed around the presidential palace.
French Defence Minister Jean-Yves Le Drian called for a replacement for Mr Djotodia “as soon as possible”.
Mr Djotodia’s resignation was made in a statement by the 10-nation Economic Community of Central African States (Eccas).
The whole of CAR’s National Transitional Council (CNT) had been flown in at short notice to decide the leadership of their nation.
The lawmakers met regional leaders while Mr Djotodia held separate talks with allies from his former Seleka rebel alliance, AFP reported.
Under a deal brokered by regional powers last year, the CNT was charged with choosing a transitional leader to take CAR to elections due at the end of 2014. It formally elected Mr Djotodia to his position as interim president last April.
Seleka seized power last March overthrowing the then-President Francois Bozize, from CAR’s majority Christian population.
Although Mr Djotodia officially disbanded the Seleka rebels, he has proved unable to keep them in check.
Their actions have prompted Christians to form vigilante groups, sparking a deadly cycle of revenge attacks.
The African Union now has some 4,000 peacekeepers in the country and France has deployed 1,600 troops to try to restore peace.