The two, who have met in China four times, are expected to discuss the stalled talks over the North's nuclear programme as well as economic issues.
China is hugely important to North Korea, as its main trading partner.
Mr Xi's visit comes a week before the G20 summit in Japan, where he is set to meet US President Donald Trump.
It will also be his first meeting with Mr Kim since the Trump-Kim meeting in Hanoi in February ended without any agreement on North Korean denuclearisation.
Why is the visit happening now?
Mr Xi's two-day visit will be the first by any Chinese leader to North Korea in 14 years and Mr Xi's first since taking power in 2012.
It is being seen as a boost for Mr Kim, who has been struggling to maintain momentum after a flurry of diplomatic activity over the past year.
The two leaders will inevitably discuss the stalled nuclear negotiations and the collapse of the Hanoi summit.
Analysts say Mr Xi will want to know what happened and whether any way can be found to move things forward, information he could then share if he meets Mr Trump in Japan.
Although the visit was confirmed only earlier this week, Jenny Town, managing editor of US-based analysis site 38 North, says it is not a huge surprise that it is happening now with the 70th anniversary of the two countries establishing diplomatic ties approaching.
She says there might be some "symbolic value" in the visiting taking place just before the G20 summit, but that it's "more of a bonus than a deciding factor".
What does China want?
The two communist-led states are old allies. But ties have been strained over the past decade, with Pyongyang's nuclear ambitions viewed critically by Beijing.
The official China Daily newspaper said on Wednesday that the visit would allow the two leaders to "agree on some concrete co-operation projects".
And in a rare front page editorial in North Korea's Rodong Sinmun newspaper on Wednesday, Mr Xi reiterated his support for nuclear talks, saying: "China supports North Korea for maintaining the right direction in resolving the issue of the Korean peninsula politically."
"The North Koreans want to keep their friends close even if there isn't a lot of trust and a lot of goodwill between them," says Ms Town.
North Korea's economy is struggling under the international sanctions regime. China is its biggest trading partner so it depends significantly on that relationship. Yet this is not an equal partnership - North Korea needs China much more than China needs North Korea.
"China has proved to be the main destination for most of North Korea's exports, including minerals, fish, textiles, and also workers," North Korea analyst Peter Ward told the BBC.
Beijing traditionally is also the main importer of goods for North Korea's industry and households. Under current sanctions, a lot of this trade has come to a halt.
"China would prefer to relax UN sanctions in these areas," Mr Ward says. "It wants to ensure that North Korea's economy grows at a fair pace and that the North does not feel the need to test ballistic missiles and/or nuclear weapons again."
Given that sanctions are not likely to get lifted there is little China can do.
Kim Hyun-wook, a professor at the Korea National Diplomatic Academy, told Reuters that Chinese economic support - possibly even China creating a "hole" in sanctions - would mean Mr Kim "doesn't have to negotiate with the US from a position of weakness".
"It can have both nuclear weapons and economic aid from China," he said.
While China can offer very little to ease North Korea's sanctions woes, the visit enables Mr Kim to show to the US that he still has China's support.