The Chinese leader's remarks on Taiwan were a stark - but not unprecedented - warning in a pomp-filled meeting that otherwise appeared friendly and relaxed, and which Trump described as possibly the "biggest summit ever".
With Trump's approval ratings dented by his Iran war, the first visit by a US president to America's main strategic and economic rival in nearly a decade has taken on added significance.
After a ceremony that featured an honour guard and throngs of children excitedly waving flowers and flags at Beijing's imposing Great Hall of the People, Trump heaped praise on Xi as they began talks that lasted more than two hours.
"You're a great leader, sometimes people don't like me saying it, but I say it anyway," Trump said in brief opening remarks on Thursday.
"There are those who say this may be the biggest summit ever."
Later, Xi said negotiations between US and Chinese economic and trade teams in South Korea on Wednesday had reached "overall balanced and positive outcomes", according to a readout by China's foreign ministry.
The negotiations had aimed to maintain a fragile trade truce struck between the world's two biggest economies in October 2025 and establish mechanisms to support future trade and investment, officials said.
Xi also broached the subject of Taiwan, the democratically governed island claimed by China and armed by the United States.
The Chinese leader told Trump that Taiwan was the most important issue they faced and if handled poorly could push the entire US-China relationship into an extremely dangerous situation and cause the countries to collide or even enter conflict, according to Beijing's readout of the talks.
Trump did not respond when a reporter later shouted a question about whether the leaders had discussed Taiwan as he posed for photos with Xi at the Temple of Heaven.
The leaders agreed to expand co-operation in trade and agriculture and exchanged views on the situations in the Middle East, Ukraine and the Korean peninsula, according to China's readout.
Trump and Xi will later attend a state banquet before taking tea and lunch together on Friday.
Joining Trump on the trip are a group of CEOs looking to resolve issues with China, including Elon Musk and Nvidia CEO Jensen Huang.
Trump has said his first request to Xi will be to "open up" China to US industry.
Trump enters the talks with a weakened hand.
US courts have hemmed in his ability to levy tariffs at will on exports from China and other countries.
The Iran war has also boosted inflation at home and escalated the risk that Trump's Republican Party will lose control of one or both legislative branches in November's midterm elections.
Though the Chinese economy has faltered, Xi does not face comparable economic or political pressure.
Nevertheless, both sides are eager to maintain a trade truce struck in October in which Trump suspended triple-digit tariffs on Chinese goods and Xi backed away from choking global supplies of vital rare earths.
Aside from trade matters, Trump is expected to encourage China to convince Iran to make a deal with Washington to end the conflict.
But analysts doubt that Xi will be willing to push Tehran hard or end support for its military, given Iran's value to Beijing as a strategic counterweight to the US.
For Xi, US arms sales to Taiwan are a top priority.
China reiterated on Wednesday its strong opposition to the sales, with the status of a $US14-billion ($A19 billion) package awaiting Trump's approval still unclear.