"We are at a crossroads in the fight against terrorism after the Paris attacks," Erdogan told a meeting of the Atlantic Council think-tank in Istanbul.
"I strongly condemn the terrorists, who believe in the same religion as me, and I am calling on all leaders of Muslim countries to put up a united front," he said.
"If not, those who knocked on our door in Ankara, will knock on your door elsewhere, as they did in Paris."
Erdogan, a pious Muslim whose Justice and Development Party (AKP) spearheaded the rise of political Islam in Turkey, has long angrily dismissed suggestions that Ankara had colluded with IS in the Syrian civil war.
Turkey has supported rebel groups throughout the over four years of conflict in Syria in the hope they can help oust President Bashar al-Assad from power.
But Erdogan lashed out at any notion "that all Muslims are terrorists," saying: "Bad people can be Muslims as well as Christians and Jews."
"Those who demonise Islam by looking at Daesh are making a big mistake," he said, using the Arabic acronym for IS. "Daesh has nothing to do with Islam."
More about: