Interested in North Korea?Add North Korea as an interest to stay up to date on the latest North Korea news, video, and analysis from ABC News.
Kim traveled to the country with his wife, Ri Sol Ju, according to Chinese state media organization Xinhua. He spent Sunday through Wednesday there.
China's President Xi Jinping held a banquet for Kim and his wife upon their arrival, Xinhua reported.
Xi welcomed Kim warmly, according to Xinhua, and Kim replied that he "enjoyed the support" of China and its people.
The visit was an "unofficial" one, Xinhua reported, adding that Kim told Xi that he came to personally update him on the developments on the Korean peninsula “out of comradeship and moral responsibility.”
Kim said that relations on the Korean peninsula are starting to improve thanks to what Xinhua reported he called North Korea's taking "the initiative to ease tensions and put forward proposals for peace talks."
In addition, Kim expressed a willingness for communication with the United States, according to Xinhua.
Kim said North Korea “is willing to have dialogue with the United States and hold a summit of the two countries,” according to Xinhua.
"The issue of denuclearization of the Korean Peninsula can be resolved, if South Korea and the United States respond to our efforts with goodwill, create an atmosphere of peace and stability while taking progressive and synchronous measures for the realization of peace," said Kim, Xinhua reported.
This visit marks a significant thaw in Chinese-North Korean relations, which had grown rather tense in recent years.
Since his sudden rise to power in late 2011, Kim has been distrustful of Chinese influence. This was especially the case with his Uncle Jang Song Thaek, whom Kim had executed for treason in 2013 for apparently selling out North Korea to the Chinese interests.
Xi, meanwhile, was widely known for his strong dislike of the North Korean leader but tolerated him nonetheless.
"The most derogatory expression I've ever heard President Xi Jinping use was his description of Kim Jong Un," former U.S. Ambassador to China Max Baucus told BBC Radio in an interview last year. "He just does not like that man at all."
The relationship grew even more fraught in 2017 after the assassination of Kim's half-brother, Kim Jong Nam, who was known to be under Chinese protection, and North Korea's repeated nuclear tests, which rattled Chinese cities on their shared border.
White House press secretary Sarah Sanders said in a statement of the news: "The Chinese government contacted the White House earlier on Tuesday to brief us on Kim Jong Un's visit to Beijing. The briefing included a personal message from President Xi to President [Donald] Trump, which has been conveyed to President Trump.
"The United States remains in close contact with our allies South Korea and Japan. We see this development as further evidence that our campaign of maximum pressure is creating the appropriate atmosphere for dialogue with North Korea."