Shortly after the meeting was made public, Trump tweeted that he would speak to his "friend" Xi about North Korea later on Tuesday.
Chinese state broadcaster CCTV showed Xi and Kim taking a seaside stroll in the northeastern city of Dalian and holding talks, while the official Xinhua news agency said the two leaders met on Monday and Tuesday.
It was Kim's second visit to China since March, highlighting efforts by the Cold War-era allies to mend ties that have chilled as Beijing has supported UN sanctions over Pyongyang's nuclear activities.
Beijing is keen to avoid being left out in the cold in the wake of Kim's historic summit last month with South Korean President Moon Jae-in and his expected meeting with Trump in June.
"After the first meeting between me and Comrade Chairman (Kim), both China-DPRK relations and the Korean peninsula situation have made positive progress. I feel happy about it," Xi said, according to Xinhua.
For his part, Kim was quoted as saying: "These are the positive outcomes of the historic meeting between me and Comrade General Secretary (Xi)."
And Trump tweeted that "the primary topics" of his discussion with Xi "will be Trade, where good things will happen, and North Korea, where relationships and trust are building."
Japanese media had earlier shown images of an airplane normally used by North Korean VIPs flying out of Dalian, fuelling speculation that Kim had been in town.
Xi said he was willing to meet Kim again to make joint efforts to have a healthy bilateral relationship, achieve peace on the Korean peninsula and promote regional stability, Xinhua said.
At their summit last month in the Demilitarized Zone dividing the two Koreas, Kim and Moon agreed to pursue the complete denuclearisation of the peninsula.
They also decided to seek a peace treaty by the end of the year and hold talks with the United States, and possibly China, to achieve it.
The Korean War, in which China fought on the North's side, ended in 1953 with an armistice rather than a peace treaty.
China would likely want to be part of discussions on a peace treaty, according to experts.
While China has supported punitive measures against the North, analysts say it could worry that the diplomatic thaw may lead to a deal between Pyongyang and Washington that is not in its interests.
A divided Korea has played in its favour as the North serves as a buffer with the South, where US troops are stationed. Despite recent tensions, China remains the North's sole major ally and top economic partner.
Trump said at the weekend that the two sides had settled on a date and location for the summit -- the first between a sitting US president and a North Korean leader -- without providing details.
South Korea's Chosun Ilbo daily reported Monday that the meeting is likely to be hosted by Singapore next month.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.