The aim is to promote safe and orderly migration and reduce human smuggling and trafficking. It addresses why people migrate, how to protect and integrate them, and how to return them to their homes.
The 34-page document will be the UN's first intergovernmentally negotiated agreement on governing regular migration, while "protecting against irregular movements that place people at risk." The agreement, however, will be non-binding.
The document is due to be formally adopted at a meeting in Marrakesh in December.
Respecting sovereigntyThe United States pulled out of the discussions last year, saying the compact was not compatible with US sovereignty.
On Friday, Hungary's foreign minister said there would be a discussion next week in Budapest to discuss the "possibility of disassociation" from the compact.
The document was drawn up following Europe's migration crisis in 2015, which saw the highest number of refugees and migrants in Europe since World War II.
Welcoming the adoption of the text on Friday, General Assembly President Miroslav Lajcak said: "It does not encourage migration, nor does it aim to stop it. It is not legally binding. It does not dictate. It will not impose. And it fully respects the sovereignty of states.
"And, in December," Lajcak added, "it will formally become the first comprehensive framework on migration the world has ever seen."
According to the UN, there are currently 250 million migrants in the world; 3.4 percent of the population.
jm/sms (Reuters, AP)
Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.