"It is not easy... to put oneself in the shoes of people so different from us," the pontiff said during a solemn mass at St Peter's Basilica.
"Local communities are sometimes afraid that the newly arrived will disturb the established order, will 'steal' something they have long laboured to build up," Francis said.
While such fears are not a sin, said the spiritual leader of the world's 1.3 billion Roman Catholics, "the sin is to refuse to encounter the other, the different, the neighbour."
"The sin is to allow these fears to determine our responses, to limit our choices, to compromise respect and generosity, to feed hostility and rejection," Francis said, adding: "We often refuse to encounter the other and raise barriers to defend ourselves."
The 81-year-old pontiff, himself the son of immigrants to Italy from Argentina, has championed the cause of migrants and asylum seekers since his election in 2013.
His first official trip outside Rome was to the tiny Italian island of Lampedusa, which was at the time the first point of arrival in Europe for thousands of migrants.
In April 2016, Francis visited the Greek island of Lesbos, a main entry point to Greece for migrants travelling from the Turkish coast, and returned home with three families of Syrian refugees aboard the papal plane.
"Every stranger who knocks at our door is an opportunity for an encounter with Jesus Christ, who identifies with the welcomed and rejected strangers of every age," Francis said Sunday.
On Monday Francis will begin an eight-day tour of his native South America, visiting Peru and Chile.
- Countries: None