Trump and Duterte were among 19 leaders at a glittering gala in the Philippines capital on Sunday ahead of an annual summit, and at one point Duterte took the microphone to sing "Ikaw" (You), in a duet with local pop diva Pilita Corrales.
One of the song's verses, translated from Filipino, begins: "You are the light in my world, a half of this heart of mine".
"Ladies and gentlemen, I sang uninvited, upon the orders of the commander-in-chief of the United States," Duterte said later, according to the ABS-CBN news channel.
Duterte, who is sometimes described as the 'Trump of the East' because of his brash style, is due to meet the U.S. president on the sidelines of the summit on Monday.
The United States and its former colony, the Philippines, have been strategic allies since World War Two. But their relations have been strained by anti-U.S. outbursts from Duterte and his enthusiasm for better ties with Russia and China.
More than 3,900 Filipinos have been killed in a war on drugs that Duterte declared when he took office last year. His government says the police act in self defence, but critics say executions are taking place with no accountability.
Duterte said last week he would tell the U.S. president to "lay off" if he raised the issue of human rights when they met.
But Trump, who has been criticised at home for neglecting rights issues in dealings abroad, praised Duterte in May for doing an "unbelievable job on the drug problem".
Trump and leaders of the 10-member Association of Southeast Asian Nations, China, Russia, Japan, Canada, South Korea, India, Australia and New Zealand were entertained by singers and dancers at the dinner.
Each of the men sported a cream-coloured barong, a traditional Philippines shirt made of fibre from the pineapple plant, hand-embroidered and worn untucked.
They were served a four-course Filipino-Asian fusion meal curate and prepared by Chef Jessie Sincioco, who also designed the menu for Pope Francis when he visited the Philippines in 2015.
(Writing by Raju Gopalakrishnan; Editing by John Chalmers)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)