A number of protests were held in the Swedish capital on Saturday, including one against Sweden's Nato bid, in which far-right extremist Rasmus Paludan burnt the Quran.
“Those who allow such blasphemy in front of our embassy [in Sweden] can no longer expect our support for their Nato membership,” Mr Erdogan said.
“If you cannot show this respect, then sorry, but you will not see any support from us on the Nato issue.”
Sweden and Finland applied to join Nato following Russia's invasion of Ukraine last year.
Before the weekend protests, Turkey had blocked the applications of Finland and Sweden largely due to concerns over how the Nordic countries treat Kurdish groups and people that Ankara considers to be terrorists.
Turkey had previously refused to ratify the applications but agreed that Sweden and Finland had time to make concessions and compromises.
The protests in Sweden sparked counter demonstrations around the world, including in Turkey and Iraq.
“If you love members of terrorist organisations and enemies of Islam so much and protect them, then we advise you to seek their support for your countries' security,” Mr Erdogan said.
He also criticised Sweden for allowing pro-Kurdish protests, in which demonstrators waved the flags of various groups, including the Kurdistan Workers’ Party (PKK), which has waged a decades-long insurgency against Turkey.
The PKK is considered a terrorist group by Turkey, the EU and the US, but its symbols are not banned in Sweden.
“So you will let terror organisations run wild and then expect our support for getting into Nato,” Mr Erdogan said. “That’s not happening.”
Mr Paludan, an anti-immigration politician who leads the Danish far-right political party Hard Line, burnt the Quran following a speech of almost an hour in which he denounced Islam.
The politician, who also holds Swedish citizenship, has held a number of demonstrations during which he has burnt the Quran.
Swedish leaders, including Foreign Minister Tobias Billstrom, said the burning of the Quran was appalling.
“Sweden has a far-reaching freedom of expression but it does not imply that the Swedish government, or myself, support the opinions expressed,” Mr Billstrom said.