While both the court's ruling and the General Assembly's resolution are not non-binding, they have nevertheless been widely perceived as a humiliating defeat for the UK, which mustered little support in its opposition to the resolution, with only Australia, Hungary, Israel, the Maldives and the United States voting in its favour.
There were 116 votes for the motion, with more than 50 abstentions, the United Nations said.
Britain has the support of the United States and is hoping that many countries - including European partners - will abstain to soften the blow.
A spokesman said: 'We have however made a longstanding commitment since 1965 to cede sovereignty of the territory to Mauritius when it is no longer required for defence purposes.
The resolution is part of a wider campaign and comes three months after the International Criminal Court decided that Britain had illegally split Mauritius and the islands, and should give up the control of the islands.More news: Humans are stealing AI jobs at Google Duplex
More news: Drake Responds To Criticism Over His 'Disrespectful' Courtside Antics
More news: Trump to sidestep Congress to clear arms deals benefiting Saudi Arabia, UAE
The principal judicial body of the United Nations had said in its opinion that the UK Government is "under an obligation" to end its administration of the Chagos Archipelago "as rapidly as possible". Furthermore FCO also stated that it did not recognize Mauritius' claim to sovereignty.
The non-binding resolution demands Britain "withdraw its colonial administration" of the Chagos Islands within six months.
In a statement, Mauritian Prime Minister Pravid Kumar Jug-Nauth told the General Assembly that the forcible eviction was comparable to "crime against humanity".
Following the vote, a spokesperson for the UK Foreign Office stressed the security implications of maintaining British control, saying: "The joint UK-US defence facility on the British Indian Ocean Territory helps to keep people in Britain and around the world safe from terrorism, organised crime and piracy". Fifteen countries did not vote.
British UN Ambassador Karen Pierce argues that the United Kingdom must maintain control over the islands at least until the end of the lease to the US.
The Indian Ocean archipelago has been at the centre of a decades-long dispute over Britain's decision to separate it from Mauritius in 1965 and set up a joint military base with the USA on Diego Garcia, the largest of the islands.