The departure of Hansjörg Haber is indicative of the increasingly fractious relationship between Ankara and Brussels, even as both sides try and implement the landmark deal to reduce to the flow of migrants to the EU.
"We confirm that the ambassador has resigned," the spokesperson told AFP.
Haber, a German diplomat who headed the EU delegation to Ankara, stepped down after he criticised in comments to media the Turkish government's conduct over the implementation of the landmark deal.
He had only been in his post since October last year.
The foreign ministry said at the time his comments caused "indignation" and were condemned by Turkey.
Haber was bitterly critical of Turkey's conduct over the deal to reduce the number of refugees crossing the Aegean Sea to EU territory, at a meeting with some reporters on May 13th.
Haber said: "We have a saying 'Start like a Turk and end like a German. But here it is the other way round'", according to Turkish media reports.
His comments at the time were seen as deeply insulting inside Turkey, where ambassadors are generally expected to show extreme respect to Turkish culture.
Former EU affairs minister Volkan Bozkir, who was in his job at the time the comments were made, said Haber had broken "the first law of diplomacy".
"No ambassador has the right to humiliate the people of the country in which he is working or to say something about its president," he was quoted as saying by the Hurriyet daily.
It said the dispute had discomforted the EU's foreign policy chief Federica Mogherini and she in the end had wanted his resignation. Intervention by Germany was not enough to ease the tensions, it added.
'Visa deal at risk?'
Turkey has demanded visa-free travel for its citizens to most of the bloc in return for curbing the refugee flow but the deal is now in limbo as Ankara refuses to meet all the criteria laid down by Brussels.
The main sticking point is that Turkey should narrow its definition of terror in its anti-terror laws that have been used to justify the arrests of academics and journalists.
But Prime Minister Binali Yildirim said Tuesday that Ankara had no intention of shifting on this issue, at a time when the military is waging an offensive against the outlawed Kurdistan Workers Party (PKK).
"In these conditions there cannot be any discussion of changing the laws on the fight against terror," Yildirim said in a speech to his parliamentary party.
He added: "Even if this means the visa deal is at stake. The visa deal will be or it will not be."
The tension over the visa deal is just one of many issues causing ructions between Ankara and Brussels, including the fight against the PKK, media freedoms and a law stripping Turkish MPs of immunity.
Turkey is also increasingly frustrated at the slow progress in its bid to join the EU, which dates back to 1987.
The European Commission is due Wednesday to publish its second report on the implementation of the EU-Turkey agreement, including elements on the progress regarding the fulfilment of the conditions for visa liberalisation.