The pugnacious new leader made the comments in a speech Sunday in Davao City, the southern Filipino city where he served as mayor for over two decades.
"Maybe we'll just have to decide to separate from the United Nations," he said in English during the address.
"If you are that insulting, son of a bitch, we should just leave," he said then in Tagalog, according to a translation
by CNN affiliate CNN Philippines. "Take us out of your organization. You have done nothing anyway."
He accused the UN of ignoring the plight of the country.
"When were you here last time? Nothing. Never. Except to criticize."
The comments come days after the UN urged Duterte's administration to step back
from its violent approach to drug crime.
The crackdown since Duterte took office in late June has seen over 650 police killings -- deaths Duterte and his top police officer, Roland Dela Rosa, say are justified self-defense killings -- alongside as many as 900 unexplained murders perpetrated by suspected vigilantes.
Duterte has also publicly accused dozens of officials and politicians of being involved in the drug trade.
U.N. urges end to extrajudicial killings
The UN has condemned the approach.
"Allegations of drug-trafficking offenses should be judged in a court of law, not by gunmen on the streets," a report released Thursday quotes human rights experts as saying.
"We call on the Philippines authorities to adopt with immediate effect the necessary measures to protect all persons from targeted killings and extrajudicial executions," the new UN Special Rapporteur on summary executions, Agnes Callamard, said in the report.
"Claims to fight illicit drug trade do not absolve the government from its international legal obligations and do not shield state actors or others from responsibility for illegal killings."
Callamard has since said that she "welcomes" any opportunity to investigate the killings on the ground. "Ready to 'see for myself,'" she tweeted Friday.
Duterte's undiplomatic style has landed him in hot water before. He recently insulted
the US Ambassador to the Philippines, calling him a "gay son of a bitch," and prior to taking office used similarly colorful language to complain that Pope Francis' visit to the country had resulted in traffic jams.
Duterte enjoys high levels of support among Filipinos, who he says are tired of the scourge of drugs.
However, the new president's approach to drug crime is facing scrutiny within the country, with one of Duterte's most vocal opponents, Senator Leila de Lima, conducting an inquiry into the high numbers of drug-related deaths since he took office.
The senator has called Dela Rosa to a senate hearing on the issue.
Last week, in a speech to police officials, Duterte launched a deeply personal attack
on de Lima, shocking many Filipinos.
Duterte stands by his tactics, which he says are justified in ridding the country of drugs.
"My orders are for the police to go out and hunt for criminals," he said. 'I tell them to arrest these criminals if they surrender peacefully, but kill them if they put up a violent struggle. I assume full responsibility for what happens."