The resolution had faced strong resistance from President Rodrigo Duterte's government, which says that the death toll reported by the rights body has been exaggerated.
The UN Human Rights Council on Thursday narrowly approved a resolution mandating a "comprehensive" international review of the Philippine drug war, which watchdogs say has killed more than 20,000 people.
The resolution had faced strong pushback from President Rodrigo Duterte's government, which counters that the toll has been exaggerated — its estimates say 5,300 have died — and that the crackdown has the strong support of many Filipinos.
Duterte's three-year so-called drug war has unleashed a surge of bloodshed in the Asian nation, with reports of nightly slaying of suspects by police and masked gunmen.
Activists said they had initially hoped the UN resolution would call for a formal "inquiry," but compromised on a "report" to win a majority.
The text, initially proposed by Iceland, secured the backing of 18 states in the 47-member rights council, with 14 nations voting against and 15 abstentions.
It calls on the United Nations High Commissioner for Human Rights, Michelle Bachelet, to prepare a "comprehensive written report on the situation of human rights in the Philippines," over the coming year.
Manila's ambassador to the UN in Geneva, Evan Garcia, immediately rejected the result.
"We will not accept a politically partisan and one-sided resolution," Garcia said after the vote, reading a statement on behalf of foreign secretary Teodoro Locsin.
"This resolution does not represent a triumph of human rights but a travesty of them," Garcia said, adding "there will be consequences."
When the former UN rights chief Zeid Raad Al Hussein previously raised concern about the drug war Duterte called him an "idiot" and a "son of bitch."
The deputy Geneva director for Human Rights Watch, Leila Matar, described the resolution as "a modest but vital" step that "signals the start of accountability for thousands of 'drug war'-related killings."
Amnesty International hailed Thursday's vote as "crucial."
It "provides hope for thousands of bereaved families in the Philippines, and countless more Filipinos bravely challenging the Duterte administration's murderous 'war on drugs'," Amnesty's regional director for east and southeast Asia, Nicholas Bequelin, said in a statement.
In addition to a report by Bachelet, the report raises concern on a range of alleged abuses under Duterte, including "killings, enforced disappearances, arbitrary arrest and detention," among others.
The drug war, launched in 2016, is Duterte's signature initiative and he has often reacted with fury when outsiders raise concerns about the project.
Earlier this month, he said "extrajudicial killing is okay, but not corruption," though he did not elaborate further.