"In a cordial and friendly atmosphere, the top leaders of the two parties and the two countries had an all-round and in-depth exchange of views on China-DPRK relations and major issues of common concern", Chinese state media said.
Trump has said he will soon announce the location and date for the summit.
Beijing is keen to avoid being left out in the cold as North Korea holds talks with South Korea and the United States. Chinese media quoted Kim as saying, "I hope to build mutual trust with the US through dialogue".
Xi said the momentum of dialogue and alleviation of tension on the peninsula is being consolidated in the direction that is conducive to a political solution, it said.
China has been making all sorts of engagements with North Korea and its neighbours to ensure that it doesn't lose out to the US-backed peace initiative in the Korean Peninsula in which Washington's ally South Korean has also played a big role.
Ramped-up security in the northeastern Chinese port city of Dalian since Monday has sparked speculation about a visit by a high-ranking North Korean official, with Kyodo News confirming airport operations remain limited and traffic restricted.
Meta Gala 2018 red carpet arrivals
It took the designer two years to make and required a handful of men to help carry the train up the Met Gala stairs. Ahead of the 2018 edition, here's a look at some of the most striking red carpet fashion from past Met Galas .
Kim was quoted as saying Monday by China's official news agency Xinhua: "I hope to build mutual trust with the USA through dialogue". They stood on a beach, sat under an awning on an outdoor deck, strolled through lush gardens and sat at a conference table.
North Korean leader Kim Jong-un (L) shakes hands with Chinese President Xi Jinping.
China is the only major ally of North Korea, though in recent months, trade between them has declined sharply, as Beijing uses economic United Nations sanctions in response to nuclear bomb tests and ballistic missiles of the North, writes CBSnews.
Kim said he had come to China to inform Xi of the situation, as events on the Korean Peninsula are unfolding rapidly.
Kim used his official aircraft to make the short flight to Dalian, in what was his first known global flight since assuming power.
This is the second informal summit Xi hosted after his last month's Wuhan summit with Prime Minister Narendra Modi during which Beijing said the two leaders reached "important consensus" and drew blueprint for future cooperation.
Chinese internet users posting on social media described heavy security in the city and extensive flight delays on Monday. Others claimed to have spotted Red Flag limousines used by the statesmen, AP said.
Pompeo, who first traveled to North Korea as Central Intelligence Agency chief in early April, is only the second sitting secretary of state to visit the reclusive nation with which it is still technically at war.