The five from the southern province of Sanliurfa were accused of damaging the president on social media, according to the Dogan news agency.
A sixth person was arrested but later released.
Almost 2,000 people have been prosecuted for “insulting” Erdogan since the former premier became president in August 2014, Turkey’s justice minister said in March.
The court cases have raised concerns over freedom of expression in Turkey and Erdogan has also been accused of seeking to muzzle the press, NGOs and academics.
Erdogan has repeatedly denied that there had been any crackdown on free expression in his country.
A German comedian has become the centre of a diplomatic spat between Turkey and Germany over a satirical poem that accused Erdogan of paedophilia and bestiality.
Turkey has demanded that Berlin prosecutes the TV satirist, Jan Bohmermann, for slander.