The Emirates' foreign minister Sheikh Abdullah bin Zayed al-Nahyan this week retweeted a post on Twitter in which a user made allegations of historic misdoings by "ancestors of Erdogan".
The tweet alleged that a former Ottoman governor pillaged and kidnapped people from the pilgrimage city of Medina in the early 20th century.
The Turkish foreign ministry summoned the Emirati charge d'affaires in Ankara on Thursday and complained about the post, state news agency Anadolu said.
The offending tweet was posted by a user called "Ali al- Iraqi", presenting himself as an Iraqi dentist living in Germany.
More From This Section
"Ali al-Iraqi" said Fahreddin Pasha - Medina governor from 1916 to 1919 - "committed a crime against the people of Medina by stealing their money, kidnapping them and putting them on trains that took them to Syria and Istanbul".
The user added: "Those are the ancestors of Erdogan and this is the history that they have with Arab Muslims."
Fahreddin Pasha was governor during the siege of Medina (1916-1919).
"Know your place! It means you do not know this country, you do not know Erdogan, you do not know about Erdogan's ancestors," he retorted.
"When Fahreddin Pasha was protecting Medina... where were your ancestors?"
Erdogan went on the attack again yesterday, saying the Emirati minister was "ill-brought up" and "too spoilt by oil and money".
Relations between the UAE and Turkey are filled with distrust as Ankara supports Qatar in a six-month crisis with its Gulf neighbours including the UAE, as well as political groups stemming from the Muslim Brotherhood movement.
Turkish pro-government newspapers also routinely allude to UAE involvement in last year's attempted coup against Erdogan.