UN Secretary General Antonio Guterres has warned that countries who impose barriers for migrants will disadvantage themselves economically.
Mr Guterres said blocking migrants from entering the country legally encouraged illegal migration in a report which was presented to the General Assembly.
The warning comes after the United States pulled out of a UN pact to improve the situations of migrants and refugees.
"Authorities that erect major obstacles to migration - or place severe restrictions on migrants' work opportunities - inflict needless economic self-harm," Mr Guterres said in the report. "They impose barriers to having their labor needs met in an orderly, legal fashion.
"Worse still, they unintentionally encourage illegal migration. Aspiring migrants, denied legal pathways to travel, inevitably fall back on irregular methods," he added.
Mr Guterres said migration should be seen as a positive phenomenon and the world must “celebrate migration’s contributions to prosperity, development and international unity”.
Next month, UN member states will discuss ways in which to encourage governments to offer more legal venues for migrants.
However, the US will be absent from the event, which aims to adopt a global compact on the issue by December.
Explaining the US decision to withdraw from the pact, US ambassador to the UN Nikki Haley said: "Our decisions on immigration policies must always be made by Americans and Americans alone.
"We will decide how best to control our borders and who will be allowed to enter our country.”
The UN report comes as a federal court blocked a move by the White House to end a programme protecting the status of thousands of undocumented migrants that arrived in the US as children.
US President Donald Trump rescinded the Deferred Action for Childhood Arrivals (Daca) programme last year but a San Francisco judge ruled it must stay in place while appeals against the move are in progress.
Daca allows 800,000 immigrants to work or go to school in the US without fear of being deported.
In Europe anti-immigration parties have been performing well in Germany, Austria, Hungary and Poland following the refugee crisis in 2015.