The text says that any decisions regarding the status of the city are "null and void" and must be cancelled.
The non-binding resolution was approved by 128 states, with 35 abstaining and nine others including Nauru voting against.
It came after US President Donald Trump threatened to cut financial aid to those who backed the resolution.
How did UN members vote?
- The nine who voted against the resolution were the US, Israel, Guatemala, Honduras, the Marshall Islands, Micronesia, Nauru, Palau and Togo
- Among the 35 abstaining were Canada and Mexico
- Those voting in favour included the other four permanent members of the UN Security Council (China, France, Russia and the UK) as well as key US allies in the Muslim world
- There were 21 countries who did not turn up for the vote.
What is so contentious about Jerusalem's status?
The status of Jerusalem goes to the heart of Israel's conflict with the Palestinians.
Israel occupied the east of the city in the 1967 Middle East war and regards the entire city as its indivisible capital.
Israeli sovereignty over Jerusalem has never been recognised internationally, and all countries currently maintain their embassies in Tel Aviv. However, President Trump has told the US state department to start work on moving the US embassy.
What does the UN resolution say?
The 193-member UN General Assembly held the rare emergency special session at the request of Arab and Muslim states, who condemned Mr Trump's decision to reverse decades of US policy earlier this month.
The Palestinians called for the meeting after the US vetoed a Security Council resolution that was similar to the text approved on Thursday.
The text put forward by Turkey and Yemen does not mention the US, but expresses "deep regret at recent decisions concerning the status of Jerusalem".
It also says "any decisions and actions which purport to have altered the character, status or demographic composition of the Holy City of Jerusalem have no legal effect, are null and void and must be rescinded in compliance with relevant resolutions of the Security Council".