The teenager, identified only by the initials U. E and initially reported to be 15, spent last night in a police station after being picked up by officers outside an Internet cafe, Cihan news agency said.
He was brought before a court but did not have charges brought against him because of his age. In Turkey, minors under 15 cannot be judged for a crime punishable by fewer than five years in jail.
The boy had been accused of "insulting" Erdogan on Facebook, a crime that carries up to four years in prison.
In that case the teenager, who called Erdogan a thief during a speech at a student protest, was given an 11-month suspended sentence.
Since Erdogan's election as president last August -- after 11 years as prime minister -- the number of prosecutions for insulting the head of state have risen. Artists, journalists and schoolchildren have all been targeted.
Earlier this month, the editor of a leading English-language daily newspaper, Today's Zaman, was detained on suspicion of insulting Erdogan in a series of tweets.
