"The DPRK is willing to have dialogue with the United States and hold a summit of the two countries," Xinhua cited Kim as saying during his visit to China which ended Wednesday, using the initials of North Korea's official name.
South Korea announced earlier this month that Kim had offered to meet US President Donald Trump but Pyongyang had not officially confirmed or denied the proposed summit.
The relationship between the North and its key protector has soured in recent years, with China increasingly exasperated by its neighbour's nuclear antics and recently showing a new willingness to enforce United Nations sanctions imposed on it over its weapons and missiles programmes.
But KCNA quoted Kim as saying at a banquet in Beijing: "There is no question that my first foreign visit is to the Chinese capital.
"This is my solemn duty as someone who should value and continue the DPRK-PRC relations through generations," he added, using the countries' official acronyms.
The North's leader invited Xi to make an official visit to Pyongyang "at a convenient time and the invitation was accepted with pleasure", KCNA added.
Such a trip by a current Chinese Communist Party general secretary and national president would be extremely unusual.
The last such visitor was Hu Jintao in 2005, and the last top Chinese leader to go was the then premier Wen Jiabao in 2009 -- although Mao Zedong's son Mao Anying was killed fighting for the North during the Korean War.
In his speech Kim said the North Korean and Chinese peoples have "sacrificed lives and shed blood in their common struggles for decades, have experienced that their lives are inseparable, and realise how important regional peace and stability is for these two neighbours separated only by a river".
He pledged to "strengthen and elevate" the relationship between the two countries, calling it "a noble heritage passed on by past predecessors".
KCNA described Kim's visit as unofficial and said it ran from Sunday to Wednesday, implying that Kim's armoured train entered China at the weekend and crossed back into North Korea early Wednesday after leaving Beijing on Tuesday afternoon.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)