Speaking on the Greek island of Lesbos, Pope Francis called the neglect of migrants the "shipwreck of civilisation".
The Pope first visited Lesbos in 2016, when it was a major entry point for people trying to reach Europe.
Since then, new flashpoints have emerged and the Pope expressed regret that little had changed.
Last month 27 people died when their inflatable dinghy sank in the Channel between France and the UK. The number of people attempting the crossing has been growing, with more than 26,000 people arriving in the UK so far this year, more than double last year's total.
Several people have also died in freezing temperatures attempting to cross into Poland from Belarus, which denies accusations it has been orchestrating the crisis at its border to destabilise the EU.
"In Europe there are those who persist in treating the problem as a matter that does not concern them - this is tragic," Pope Francis said.
"History teaches us that narrow self-interest and nationalism lead to disastrous consequences."
The pontiff was speaking at a temporary camp housing about 2,000 asylum-seekers, which replaced the overcrowded Moria camp that was destroyed in fires last year.
While the coronavirus pandemic had shown that major challenges had to be confronted together and there were some signs of this happening on climate change, there was little sign of such an approach to migration, he said.
"It is easy to influence public opinion by instilling fear of the other," Pope Francis said.
"The remote causes should be attacked, not the poor people who pay the consequences and are even used for political propaganda."
Little appetite in Europe to welcome more migrants
By Fergal Keane, BBC News, Lesbos
This was a speech delivered in front of refugees but aimed squarely at political leaders across the European continent. The Pope's words betrayed frustration at what he sees as the failure of politicians to adequately address the migrant issue.
His message of compassion for asylum seekers is not new but his language on Lesbos was exceptionally forthright.
Pope Francis was speaking against the backdrop of pushbacks of migrants at sea - including close to Lesbos - and on European land borders, as well as the erection of fences to prevent them reaching the EU.
Will his words make any difference? They certainly inject a powerfully compassionate element in a debate so often framed in the language of fear.
But there is very little political appetite in Europe to liberalise the migration system. Nor is there any sign of the kind of global political will to address the problems of conflict and extreme poverty which drive so many to flee their homes.
The number of people entering Europe reached a high point in 2015, when more than a million people fleeing the Syrian civil war and other crises made the journey.
Since then numbers have fallen as nations along migrant routes closed borders. The EU also agreed a deal to return failed asylum seekers to Turkey and has provided support for the Libyan coastguard to pick up people who set off to sea.
But the flow of people has not stopped, with 1,650 recorded by the International Organization for Migration as having gone missing while attempting to cross the Mediterranean this year.
The pontiff met children in the Mavrovouni camp
Francis said he understood that there was a lot of "fatigue and frustration" over migration that had been exacerbated by the pandemic, but warned that without change there was a risk that civilisation itself would find itself "shipwrecked".
"Let us eradicate the prevailing mentality revolving around our ego and personal and national egoisms which determine every decision we take," he said.
Greek President Katerina Sakellaropoulou, who was accompanying Francis, said the migration issue was the responsibility of all Europe, not just Greece.
More than 8,000 people have crossed into Greece by land and sea this year, down from about 15,000 last year and about 75,000 the previous year, according to EU figures.
Greece is building closed camps on several islands to house asylum seekers until their claims are processed. It denies that Greek coast guards push back migrants at sea, insisting that they are saving lives.
British Home Secretary Priti Patel has cited the Greek pushbacks as a possible model for the UK to push back migrant boats in the Channel.
The EU countries 'pushing back' asylum seekers at sea