His comments came as Turkey has been vehemently criticised over the crackdown in the wake of the coup
Erdogan said in a speech at his presidential palace to mark the formal opening of the TRT World channel that there were writers in Western media sympathetic to the US-based Turkish cleric Fethullah Gulen who Ankara blames for the July 15 coup.
"If the coup had been successful... then foreign media would have mobilised their cameras and pens to legitimise the coup," Erdogan said.
He said those foreign media who are now criticising Turkey over freedom of expression "would have given their screens over to the junta".
But with the defeat of the coup, "The headlines they prepared were good for nothing."
The Turkish strongman said his country had had "bitter experience" over the last three years and was "well aware" how foreign media had behaved during the 2013 protests against his rule.
He added there were writers in Western media who saw July's coup plotters as the "last hope" for Turkey and a prominent place had been given to sympathisers of Gulen and the outlawed Kurdistan Workers Party (PKK).
His comments came as Turkey has been vehemently criticised over the crackdown in the wake of the coup, including the arrests of journalists.
TRT World started broadcasting in March last year but the ceremony at the presidential palace was touted by state media as marking its formal launch.
Citing what he said was an African proverb, Erdogan said that if lions did not write their own stories then people would have to listen to the stories of the hunters.
Describing the channel as Turkey's "window on the world", he said he did not want TRT World to be an "official bulletin" but would tell "the truths of our nation through the best television".
TRT World, broadcasting in English round the clock, is part of the network of Turkey's state run television TRT.
In recent years, several regional powers have opened their own English-language TV channels -- such as RT in Russia and Press TV in Iran -- to challenge the perceived monopoly of the likes of CNN and the BBC.
Turkey has repeatedly complained that its side of the story is overlooked in Western reporting in the conflicts in Syria or its southeast.