North Korea has strained ties with China over its repeated missile tests Image copyrightAP
China's Xinhua state news agency made no mention of the nuclear comments, but said Mr Kim hoped to build closer ties with China.
It quoted Mr Xi repeating China's policy on the Korean peninsula, calling for calm and restraint, increased communication and regional stability.
Mr Ri's visit to China is the first by a North Korean official since a once-in-a-generation Workers Party Congress last month.
The former foreign minister was expected to brief Mr Xi on any major developments at the congress.
China remains an ally of North Korea's while at the same time abiding by sanctions imposed by the UN over its repeated missile launches and a nuclear test earlier this year.
Beijing appears to have been growing impatient in recent years with the reclusive state, which is dependent on trade with China.