Chinese state media footage of Kim Jong-il's secretive visit to Beijing
North Korean leader Kim Jong-il is committed to ending the North's nuclear programme, Chinese state media says.
Mr Kim's secretive visit to Beijing was only confirmed once it was finished.
He told Chinese President Hu Jintao he would work with China "to create favourable conditions" for talks, state news agency Xinhua reported.
Six-party negotiations to dismantle the North's nuclear capability are hosted by China and involve the two Koreas, the US, Japan and Russia.
North Korea quit the talks in April 2009, after the UN imposed sanctions for a missile test.
Mr Kim - who arrived in China on Monday and has now returned to Pyongyang - was accorded the rare distinction of meeting all of China's top leaders during his visit.
"The DPRK (North Korea) is willing to work with you to create favourable conditions for a resumption of the six-party talks," Xinhua quoted Mr Kim as telling President Hu.
Oct 2006 - North Korea conducts an underground nuclear test
Feb 2007 - North Korea agrees to close its main nuclear reactor in exchange for fuel aid
June 2007 - North Korea shuts its main Yongbyon reactor
June 2008 - North Korea makes its long-awaited declaration of nuclear assets
Oct 2008 - The US removes North Korea from its list of countries which sponsor terrorism
Dec 2008 - Pyongyang slows work to dismantle its nuclear programme after a US decision to suspend energy aid
Jan 2009 - The North says it is scrapping all military and political deals with the South, accusing it of "hostile intent"
April 2009 - Pyongyang launches a rocket carrying what it says is a communications satellite
25 May 2009 - North Korea conducts a second nuclear test
The BBC's Michael Bristow in Beijing says a close examination of Mr Kim's comments suggests the aim of persuading Pyongyang to give up its nuclear ambitions remains a distant goal.
The North Korean leader did not wholeheartedly commit to returning to the six-nation talks, our correspondent notes.
Premier Wen Jiabao was quoted as telling Mr Kim in a separate meeting
: "China will, as always, support the DPRK's economic development and improving people's livelihood."
Both sides said they would strengthen economic ties and look for new investment projects.
State TV footage showed Mr Kim, who is 68 years old, looking frail and thin.
The North Korean leader is believed to have suffered a stroke in 2008.
Speculation over his health has fuelled uncertainty about who will succeed him and the impact on Pyongyang's nuclear capability.
The North's Korean Central News agency said Mr Kim's "unofficial" visit ended on Friday.
"The leader of the DPRK received a sincere and warm welcome from Chinese people wherever he went in China," it reported. "Kim Jong-il expressed satisfaction over the result of his visit."
This week's visit was Mr Kim's fifth to China since succeeding his father as ruler in 1994, with the last in 2006.