Duterte has faced international condemnation for his brutal crackdown on crime, which has claimed thousands of lives and led to warnings from rights groups about a possible crime against humanity.
The White House said the two leaders, who were both elected to office last year, had "a very friendly conversation" that included discussion about the Philippine government's efforts to "rid its country of drugs" and the regional security threat posed by North Korea. "President Trump also invited President Duterte to the White House to discuss the importance of the United States-Philippines alliance, which is now heading in a very positive direction," the statement said.
There has been concern about Duterte's efforts to loosen the Philippines' long-standing alliance with the US as he looks to court China, whose push to control most of the disputed South China Sea has alarmed neighbours. Duterte has regularly hit out at the Philippines' one-time colonial ruler for perceived hypocrisy over human rights and last year branded then US president Barack Obama a "son of a whore" for criticizing the drug war.
The White House said Trump "enjoyed the conversation" with Duterte, and looked forward to attending the key US-ASEAN and East Asia summits in the Philippines in November.
Vice President Mike Pence had announced earlier this month that Trump would attend the Asian meetings as a sign of "unwavering commitment" to the region.
Duterte's spokesman Ernesto Abella confirmed Trump's invitation, although he gave no indication of when the visit would take place.
Philippine police have reported killing 2,724 people as part of Duterte's anti-drug campaign, although authorities insist the shootings have been in self defence.
Many thousands of others have been killed by shadowy vigilantes, according to rights groups. A Philippine lawyer last week filed a complaint at the International Criminal Court accusing Duterte of mass murder, alleging his war on drugs had led to about 8,000 deaths.