During an April 29 call that focused mostly on North Korea's nuclear and ballistic missile program, Trump congratulated Duterte on doing an "unbelievable job on the drug problem."
Trump also extended an invitation for "good man" Duterte to visit the White House "anytime you want to come," before the two leaders are set to meet in the Philippines in November.
"Many countries have the problem, we have a problem, but what a great job you are doing and I just wanted to call and tell you that," Trump said, according to a transcript made by the Philippine government and released by The Washington Post and The Intercept.
Related reading
Duterte declares 'harsh' martial law in southern Philippines
Duterte responded by saying drugs are the "scourge of my nation now and I have to do something to preserve the Filipino nation."
In an apparent dig at his predecessor Barack Obama -- who had canceled a bilateral meeting with Duterte after the Philippine president insulted him -- Trump then said: "I understand that and fully understand that and I think we had a previous president who did not understand that."
Police have reported killing about 2,700 people since Duterte took office at the end of June and immediately launched his war on drugs.
Unknown assailants have killed more than 1,800 others, while about 5,700 other violent deaths are under investigation, according to police data.
Partly in response to American criticism, Duterte has loosened the Philippines' traditionally strong ties with its ally.
Duterte has instead embraced China, which has supported his drug war and sought to deepen economic ties by providing billions of dollars' worth of investments and aid to the Philippines.
OTHER NEWS: Trump labels Manchester bomber 'loser'
Related reading
Trump set to exchange views with Pope Francis at Vatican