The Southeast Asian leader warned he would lash out if the US President raised extrajudicial killings in the Philippines' new war on drugs in an anticipated meeting in Laos.
He and Mr Obama were due to meet on Tuesday in Laos on the sidelines of an Asean conference. The Philippine leader has been under intense global scrutiny over the more than 2,000 suspected drug dealers and users killed since he took office, and Obama has said he planned to raise the issue.
Speaking at the G20 summit in China on Monday morning, Obama said he had heard about Duterte's "colorful" remarks and instructed his staff to see if meetings with Duterte would still be "productive".
"I don't give a s*** about anybody observing my behaviour", he said. "I am the president of a sovereign country and I am not answerable to anyone except the Filipino people", he told reporters.
He added that: "I do not have any master except the Filipino people, nobody but nobody". Apparently addressing Obama, he added: "You must be respectful". "Do not just throw away questions and statements".
He has also threatened to withdraw from the United Nations, after human rights experts said his order for police and the public to kill suspected drug traffickers was tantamount to "incitement to violence and killing, a crime under worldwide law".
Mr. Obama, who arrived in Laos late Monday night to become the first USA president ever to visit the Southeast Asian country, is encountering more than his usual share of friction and confrontation on his 10th trip to the region.
National Security Council spokesman Ned Price said Mr Obama would meet South Korea's president instead.
Duterte was quoted by CNN as fuming about Obama in a speech Monday.
Obama responded in his own speech later: "Clearly, he's a colourful guy".
Duterte said he would demand that Obama allow him to first explain the context of his crackdown before engaging the US president in a discussion of the deaths.
"I always want to make sure that if I'm having a meeting, that it's actually productive and we're getting something done", Mr Obama told reporters. "As a matter of fact, America has one too many (killings) to answer for", he said. Congressional leaders say they won't consider it, even in a lame-duck session after the presidential election, and both Mr. Trump and Democratic nominee Hillary Clinton oppose it.
"I'm just going to make an assessment", Obama said.
The war on drugs will continue and many will be killed "until the last pusher is out of business", he said.
"We regret a lot that a child was killed when she was not the target", said Denila Katalbas, the police chief in Guihulngan City.
Washington has tried largely to look the other way as Mr Duterte has pursued closer relations with China, a marked shift for the Philippines considering recent tensions over Beijing's aspirations in the South China Sea.