Mr Trump was widely expected to use his address at the Arab-Islamic-American Summit in Riyadh, Saudi Arabia, to soften his tone towards followers of the Muslim faith, after his recent attempts to ban tens of thousands of them from America.
Having earlier said he was not there to tell people what to do, Mr Trump did offer advice for dealing with terrorists.
"A better future is only possible if your nations drive out the terrorists and drive out the extremists.
"Drive them out. Drive them out of your places of worship, drive them out of your communities. Drive them out of your holy land and drive them out of this earth."
"Muslim nations must be willing to take on the burden that we are going to defeat terrorism and send its wicked ideology into oblivion.
"Every country in the region has an absolute duty to ensure that terrorists find no sanctuary on their soil."
His speech is seen as a reset with Muslims after his campaign rhetoric stirred concerns in the Islamic world.
Mr Trump had previously suggested he would be open to creating a database of all the Muslims in the US, also called for Muslims to be temporarily banned from entering the US over security concerns.
Speaking in the Saudi capital, Mr Trump called this a "new chapter", saying he was not there to "lecture" the countries or impose America's way of life.
The fight against extremism, he added, was not a battle between different faiths: "This is a battle between good and evil".
The countries could not wait for "America power" to act, he said.
"We can only overcome this evil if the forces of good are united and strong, and if everyone in this room does their fair share and fulfils their part of the burden."
Mr Trump singled out Iran for being responsible for instability in the region, saying it should be "isolated".
"For decades, Iran has fueled the fires of sectarian conflict and terror," Trump said.
"It is a government that speaks openly of mass murder, vowing the destruction of Israel, death to America, and ruin for many leaders and nations in this very room."
Iran is a Shi'ite Muslim country. The groups that the United States has been fighting in Afghanistan, Iraq and elsewhere since the September 11, 2001 attacks on Washington and New York are mostly Sunni Muslims, and enemies of Iran.
The speech was a change in tone for Mr Trump who, in an interview last year, famously said: "I think Islam hates us."
He did not include the controversial phrase "radical Islamic terrorism". In the past, he has criticised his predecessor, Barack Obama, and others for not employing these terms, considered offensive by many Muslims.
Meanwhile, Iran's foreign minister Mohammad Javad Zarif advised Mr Trump to discuss with the Saudi hosts of his first official visit abroad how to avoid another September 11th attack.
Tehran and Riyadh are regional arch-rivals who accuse each other of sponsoring fundamentalist militias aligned to their competing sects of Islam in warzones across the Middle East.
Critics of Saudi Arabia say its strict view of Islam fuels Sunni extremism, called takfir, and some even accuse the kingdom of responsibility for the September 11th attacks on America.
Saudi Arabia denies providing any support for the 19 hijackers - most of whom were Saudi citizens - who killed nearly 3000 people in 2001.
At a campaign event last February, Mr Trump himself suggested to supporters that the kingdom may be behind the attacks.
Cutting off the money
The US and six Gulf states were expected to sign a deal to co-ordinate their efforts aimed at cutting off sources of money for extremist groups, including the militant group Islamic State.
The countries - Saudi Arabia, Qatar, Kuwait, Oman, the United Arab Emirates and Bahrain - are involved in the fight against the militants, but have been accused of backing the group and other Sunni militants - most notably in a 2014 email by Hillary Clinton released by Wikileaks.
"The unique piece of it is that every single one of them are signatories on how they're responsible and will actually prosecute the financing of terrorism, including individuals," said Dina Powell, US Deputy National Security Adviser for Strategy.
In a separate development, on Saturday, Mr Trump signed trade deals of $US350bn with Saudi Arabia.
This included a $110bn in armaments, the largest arms deal ever made in US history, according to the White House.
Secretary of State Rex Tillerson said it was aimed at countering the "malign" influence of Iran, Saudi Arabia's regional rival.
Photo: AFP (US President Donald Trump speaks during the Arabic Islamic American Summit at the King Abdulaziz Conference Center in Riyadh, Saudi Arabia).