Trump is on the first visit by a US president to China, America's main strategic and economic rival, since a 2017 visit during his first term, and has been hoping for tangible results that might improve his dented approval ratings ahead of crucial midterm elections.
The two leaders are scheduled to have tea and lunch on Friday before Trump flies back to the United States.
"Hopefully our relationship with China will be stronger and better than ever before!" Trump wrote in a post on his Truth Social platform early on Friday.
The summit has been aimed at maintaining a fragile trade truce struck when the leaders last met in October and Trump suspended triple-digit tariffs on Chinese goods and Xi backed away from choking global supplies of vital rare earths.
Trump has also been expected to urge China to convince Iran to make a deal with Washington to end a war unpopular with American voters. But he has travelled to Beijing with a weakened hand after US courts limited his ability to levy tariffs at will and as price increases driven by the Iran war have made him politically vulnerable at home.
A brief US summary of Thursday's talks highlighted what the White House called the leaders' shared desire to reopen the Strait of Hormuz waterway off Iran, through which one-fifth of global supplies of oil and liquefied natural gas travel in normal times, and Xi's apparent interest in buying American oil to reduce China's dependence on Middle East supplies.
Xi's remarks on Taiwan, the democratically governed island Beijing claims, represented a sharp, if not unprecedented, warning during a pomp-filled summit that otherwise appeared friendly and relaxed.
China's foreign ministry said they came in a closed-door meeting that ran more than two hours.
Taiwan, which lies just 80km off China's coast, has long been a flashpoint in US-China ties, with Beijing refusing to rule out the use of military force to gain control of the island and the United States bound by law to provide Taipei with the means to defend itself.
US Secretary of State Marco Rubio, who is with Trump in China, told NBC News that Taiwan was discussed, saying the Chinese "always raise it ... we always make clear our position and we move on to the other topics".
At a lavish state banquet, Xi called the China-US relationship the most important in the world and added: "We must make it work and never mess it up."
China's foreign ministry said Xi had told Trump that preparatory negotiations between US and Chinese trade teams on Wednesday had reached "balanced and positive outcomes."
US Treasury Secretary Scott Bessent, who led those talks, said he expected progress on establishing mechanisms to support future bilateral trade and investment, and an announcement about large Chinese orders for Boeing aircraft.
When asked about Hong Kong's most vocal China critic, media tycoon Jimmy Lai, who was sentenced to 20 years in jail in February on two counts of conspiracy to collude with foreign forces and one count of publishing seditious materials, Rubio said Trump had raised the case with Xi.
"The president always raises that case and a couple others, and obviously we'll hope to get a positive response from that," Rubio told NBC News.
"We'd be open to any arrangement that would work for them, as long as he's given his freedom," he said of Lai, who had denied all charges against him.
A Chinese foreign ministry spokesperson, when asked about Lai, has previously said that Hong Kong affairs were an internal matter for China.
with AP