Travelling along with his wife, Ri Sol-ju and a ministerial delegation, Kim arrived in the Chinese capital in his famed green and yellow armoured train on Tuesday morning and conducted bilateral engagements with Xi. He left for Pyongyang by the same train.
Television footage showed the train travelling on an elevated track over a busy street in Beijing.
North Korea and China commemorated the 70th anniversary of the establishment of diplomatic ties. On Wednesday, it was also believed to be Kim's 35th birthday and a special lunch was reportedly hosted by Xi after the talks.
The return trip will take around 14 hours to reach Dandong, a city located at the China-North Korea border.
The Chinese Foreign Ministry did not divulge much on the nature of Kim's visit to China, stating that the two nations were making "joint efforts to uphold peace and stability in the Korean peninsula."
It is worth mentioning that North Korea's key ally internationally is China, which is also the communist nation's biggest trading partner.
Kim's visit came when an official delegation, headed by Deputy US Trade Representative Jeffrey Gerrish came to China on Monday to strike a deal over the ongoing trade tiff between the world's two largest economies.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)