"At a time when Turkey is hosting three million (migrants), those who are unable to find space for a handful of refugees, who in the middle of Europe keep these innocents in shameful conditions, must first to look at themselves,"
Erdogan said in a speech broadcast on television.
He accused some countries of directly or indirectly supporting terrorism, in apparent reference to the Kurdistan Workers Party (PKK) militant group which has waged a three-decade insurgency in Turkey's southeast. A PKK offshoot has claimed responsibility for two suicide bombings that killed 66 people in Ankara in the last month.
European leaders have expressed concern about the loss of civilian life in the southeast amid Turkey's military operations to flush out the PKK, urging it to use proportional force.
"Our struggle against terrorism is measured and legitimate ... Every terrorist organisation active in our region and in Turkey has unified against Turkey. Many states, primarily Western countries, still cannot display a principled stance against these groups," he said.
He complained that Belgian authorities had allowed a pro-PKK tent to be put up outside the summit venue in Brussels, although he said its flag and posters had later been taken down.
European Union leaders are trying to convince Turkey's prime minister to help end Europe's migration crisis in return for financial and political concessions, but they remain unsure if Friday's Brussels summit can clinch a deal.