Erdogan was staying in the western seaside resort of Marmaris on July 15 but dashed to Istanbul just before the hotel came under attack from rebel soldiers determined to oust him from power.
"Eleven of them were captured in Ula," Deputy Prime Minister Numan Kurtulmus told a press conference after a cabinet meeting, referring to a town near Marmaris.
He said one soldier was still at large.
Erdogan earlier said his swift escape had saved him from being killed or taken hostage.
Also Read
The soldiers had been hiding in the wild landscape above Marmaris since the military action, and the villagers spotted them while they were out boar-hunting.
"There was an exchange of fire during the operation," the official added. "Drones and helicopters were used to pinpoint the location."
Since the coup, Erdogan has launched a massive purge of Turkish institutions, especially the military, with more than 3,000 armed forces personnel dismissed.