China is the key ally of isolated, nuclear-armed North Korea and its main source of trade and aid.
After arriving in the Chinese capital, Kim met with Xi for around an hour, Seoul’s Yonhap news agency reported late Tuesday, citing unnamed sources who said the talks focused on a possible summit with US President Trump and ways to deepen ties.
Kim and his wife Ri Sol Ju then attended a dinner hosted by Xi and first lady Peng Liyuan at Beijing’s Great Hall of the People, Yonhap reported.
China’s foreign ministry earlier said Kim would meet with Chinese leaders to discuss “relevant issues" but did not reveal more about his itinerary.
The North Korean leader, accompanied by several senior officials, had left Pyongyang on his private train on Monday, the official Korean Central News Agency reported.
The trip, at Xi’s invitation, is set to run until Thursday, according to KCNA and China’s official Xinhua news agency.
Kim’s fourth visit to China comes a week after he warned in a New Year’s speech that Pyongyang may change its approach to nuclear talks if Washington persists with sanctions.
“Both Xi and Kim see value in coordinating their positions in advance of Trump-Kim summits. That appears to be a pattern," Bonnie Glaser, a senior adviser at the Center for Strategic and International Studies, told AFP.
“Kim also seeks Beijing’s help in getting international sanctions eased."
While China and Russia have both said the United Nations should consider relaxing sanctions on Pyongyang, Trump insisted Sunday that they would remain “in full force" until the US sees “very positive" results on the nuclear issue.
Kim’s trip coincides with the second day of talks between US and Chinese officials in Beijing aimed at resolving their trade war, but China rejected the notion that it was using the North Korean issue as a bargaining chip in the negotiations.
“Xi also gains from a summit with Kim -- and the timing could not be any better," said Harry Kazianis, director of defence studies at the Center for the National Interest, a US think tank.
“With Chinese and US officials meeting to discuss how to end the growing trade war between the two superpowers, it shows Beijing clearly has a North Korea card to play if it sees fit."
The trip began under the usual veil of secrecy and Kim has not been spotted in public since a motorcade believed to be carrying the North Korean entourage left a Beijing train station under heavy security early Tuesday.
While the visit was the second item on China’s evening news broadcast, newscasters simply read out a statement from the morning without showing any images of the visit.
Kim -- whose birthday is reportedly on Tuesday -- visited China three times last year for talks with Xi.
“This is Kim’s first birthday in China. It shows his close relationship with China, like members of one family," said Beijing-based independent political commentator Hua Po.
But relations hit a rough patch in recent years as China backed the UN sanctions over Pyongyang’s nuclear tests.
Until his first trip in March, Kim had not met Xi in the six years after inheriting power from his father.
“At different times, our interactions are different, but communication is maintained," Chinese foreign ministry spokesman Lu Kang said at a regular press briefing.
“As to in what form this is reflected, I don’t think there’s a need to read too much into it," Lu said, adding that US trade talks and Kim’s visit were unrelated.
A whirlwind of diplomacy enveloped the Korean peninsula last year, with Kim also meeting the South’s President Moon Jae-in three times, and culminating in his high-profile Singapore summit with Trump in June.
In Singapore, Kim and Trump signed a vaguely worded pledge about denuclearisation of the Korean peninsula, but progress has since stalled amid disagreements over what that means, with meetings and visits cancelled at short notice.
In Seoul, Kim Eui-kyeom, spokesman for the presidential Blue House, said it had been aware of the visit in advance.
“We hope that the latest exchange between China and the North will help establish complete denuclearisation and permanent peace on the Korean peninsula and serve as a springboard for a second North-US summit," he said.
Negotiations were underway on the location of their next meeting with Kim, Trump said Sunday, while remaining evasive on its timing.
The US president said last week he had received a “great letter" from the North Korean leader but declined to reveal its contents.
Washington is demanding Pyongyang give up its nuclear arsenal before any relief from sanctions is granted, while the North is insisting on immediate concessions from the US.
Culminating in late 2017, Pyongyang carried out six nuclear tests and launched rockets capable of reaching the entire US mainland, but has now carried out no such tests for more than a year.
This story has been published from a wire agency feed without modifications to the text. Only the headline has been changed.