Nearly 330 other officers - including some senior military figures - were also convicted for their involvement in the plot.
Thirty-four people were acquitted. All the defendants denied the charges.
The officers were accused of plotting to bomb mosques and trying to trigger a war with Greece in order to justify a military coup.
Former army generals Cetin Dogan, Ozden Ornek and Ibrahim Firtina were initially given life sentences by the court in Silivri, near Istanbul, but then their sentences were dropped to 20 years.
The defendants denounced the evidence as fabricated and accused the government of carrying out a witch-hunt against the armed forces.
Speaking before the sentences were announced, Gen Dogan, former commander of Turkey's First Army, branded the two-year trial "unfair and unlawful".
He is accused of being the mastermind behind the 2003 alleged plot.
"Here we see a process unfolding to make the soldiers of Mustafa Kemal (Ataturk, the founder of modern Turkey), who give their lives for their country, to pay the price of their commitment to the republic and its principles," he said, according to court documents.
Prosecutors say "Operation Sledgehammer" was a conspiracy to trigger a coup against the elected government of Recep Tayyip Erdogan.
Turkey's military has long seen itself as the guarantor of the country's secular constitution.
It staged three coups between 1960 and 1980 and has a history of tension with the Justice and Development Party (AKP) of Prime Minister Erdogan.
A Turkish court has sentenced three former army generals to 20 years in jail each for plotting a coup.