The announcement came on the eve of the twice-yearly meeting of Turkey's Supreme Military Council, when key appointments were due to be made.
The head of the armed forces, Gen. Isik Kosaner, and the commanders of Turkey's ground, naval, and air forces, all requested retirement. Their departures leave the second-largest military force in the NATO alliance temporarily leaderless.
The resignations came after meetings on Friday between military chiefs, Mr. Erdogan, and President Abdullah Gul.
The generals did not give a reason for their decisions. But the state-run news agency at first reported that General Kosaner resigned "as he saw it necessary," but then removed the story saying he sought retirement, according to Reuters.
The meeting of the Supreme Military Council could be postponed. An argument over appointments nearly delayed a similar meeting last year.
Tension and suspicion has existed between the military and the Islam-rooted Justice and Development Party (AKP) since the party of Erdogan and Mr. Gul first came to power nearly a decade ago.
Turkey's large military forces have long considered themselves the protectors of secular rule – and believed that the AKP has an Islamist agenda. The military carried out three coups between 1960 and 1980, and then forced from power in 1997 the Islamist Welfare Party – the seed of the more moderate AKP.
But in recent years the officer corps has been battered by a series of court cases and investigations that uncovered coup plots and other schemes to undermine AKP rule. The "Sledgehammer" coup case and intricate "Ergenekon" secret network of antigovernment conspiracists have left 200 officers in jail – 42 of them serving generals.
On Friday, a prosecutor in another plot case sought the arrest of 22 people that included a regional commander, Reuters reported.
It was not clear how the resignations of Turkey's top brass would change the relationship between the AKP and the military. The AKP received about 50 percent of votes in a national poll in June, and plans to change the Constitution, which was primarily written by the military during the 1980 coup.
Turkish newswires reported that Kosaner was joined in calling for retirement by land forces chief Erdal Ceylanoglu, air force head Hasan Aksay, and navy head Ugur Yigit.