The two leaders met in Beijing's Great Hall of the People for talks following the US president's glitzy royal welcome in the Chinese capital.
"I just want to thank you for the warm welcome and I look forward to many years of success and friendship, working together to solve not only our problems, but world problems and problems of great danger and security," Trump said.
Trump is in China as part of a five-nation tour of Asia. He has already visited South Korea and Japan, and will go on to Vietnam and the Philippines later in the week.
Discussion on how to deal with North Korea's threats to the region has dominated Trump's agenda.
More From This Section
Earlier, Trump was given a lavish welcome with a guard of honour and 21-gun salute when he arrived at the Great Hall of the People before his talks with Xi, which were confined to delegations.
"We enjoyed every minute of it with your beautiful wife and Melania together. Their relationship is a great one and our relationship has already proven to be a great one," he said.
"Our meeting this morning in front of my representatives and your representatives was excellent, discussing North Korea. And I do believe there's a solution to that as you do," he said.
"We must act fast. And hopefully China will act faster and more effectively on this problem than anyone," Trump said.
"But we'll make it fair and it'll be tremendous to both of us," he said.
On his friendship with Xi, he said "my feeling toward you is an incredibly warm one. As we said there's great chemistry and I think we're going to do tremendous things both for China and the United States. And it is a very, very great honour to be with you," he said.
Earlier, welcoming Trump, Xi said, "We have had in-depth exchange of view since yesterday on the China-US relations and importance of issues of shared interest. We reached many common understandings".
"We agree that the China-US relations have made important progress this year. We have agreed to further promote strategic guidance of summit diplomacy for bilateral relations," he said.
He said both sides should enhance cooperation to resolve the crisis over North Korea's nuclear programme and Afghanistan.
"Enhance cooperation on the nuclear issue on the Korean Peninsula, Afghanistan and other major international and regional issues and work together to take China-US relations to even greater development," he said.
"The China-US relationship now stands at a new starting point. China is ready to work with US to enhance cooperation and properly manage difference in a mutual respect and mutual benefit. This way we will enable people across the world to benefit more from China-US relations," Xi said.
Trump is being accorded a "state welcome plus" by China during his three-day visit.
Trump is also scheduled to meet Chinese Premier Li Keqiang and attend a reception followed by a state dinner and cultural performances.
During his reception to Trump yesterday, Xi said he believed Trump's state visit to China would achieve "positive and important" results.
Since Trump took office in January, the two leaders have maintained close contact. They already have had two face-to- face meetings and eight phone conversations.