Kim's armoured train departed the Far Eastern port city of Vladivostok a day after talks that saw Putin back the North's need for "security guarantees" in its standoff with the United States.
The official Korean Central News Agency reported that Kim told Putin the US had adopted a "unilateral attitude in bad faith" at a summit with US President Donald Trump two months ago in Hanoi.
"Peace and security on the Korean peninsula will entirely depend on the US future attitude, and the DPRK will gird itself for every possible situation," Kim was quoted as saying.
The Kim-Trump summit broke down in late February without a deal, after cash-strapped Pyongyang demanded immediate relief from sanctions but the two sides disagreed over what the North was prepared to give up in return.
Russia has called for the sanctions to be eased, while the US has accused it of trying to help Pyongyang evade some of the measures - accusations Moscow denies.
Just a week ago, Pyongyang demanded the removal of US Secretary of State Mike Pompeo from the stalled nuclear talks, accusing him of derailing the process.
On Thursday, Putin emerged from the meeting saying that like Washington, Moscow supported efforts to reduce tensions and prevent nuclear conflicts. But he also insisted that the North needed "guarantees of its security, the preservation of its sovereignty".
It was "what the North has been saying all along" said Kim Keun-sik, professor of North Korean Studies at Kyungnam University, adding that Putin's support for Pyongyang's stance was the "biggest prize" Kim won in Vladivostok.
Putin flew on to another summit in Beijing the same day, while Kim stayed in Vladivostok and had been due to take part in a series of cultural events.
But the mercurial North Korean kept officials in suspense about his post-summit plans.
A wreath-laying ceremony was delayed by two hours on Friday morning, with an honour guard kept waiting and the red carpet rolled up. Kim eventually showed up and the wreath was laid. Solemn music played as he stood, hat in hand wearing a black double-breasted waistcoat.
Russian media had reported that Kim would be visiting the city's aquarium and seeing a ballet, but the visit was apparently cut short.
Kim instead turned up at the train station in the afternoon and, after a final departure ceremony with a military band, boarded his train and left around 3:30 pm (0530 GMT).
Regional governor Oleg Kozhemyako told journalists that Kim had also been to a restaurant that his father had previously visited. The North Koreans ate Russian food and listened to "traditional Russian folk songs that they know very well and love," Kozhemyako said.
"He promised to come back, he liked the city, he liked the region; we tried to do everything," Kozhemyako said.
The summit saw both leaders saying they were looking to strengthen ties that date back to the Soviet Union's support for the founder of North Korea, Kim's grandfather Kim Il Sung.
Kim said he hoped to usher in a "new heyday" in ties between Pyongyang and Moscow. The North Korean strongman invited Putin to visit "at a convenient time" and the invitation was "readily accepted", KCNA said.
"Kim met Putin because he wanted to show he had someone on his side," said Lee Woo-young, a professor at the University of North Korean Studies in Seoul.
"Kim is seeking the upper hand for future talks with the US and meeting foreign leaders like Putin can help him do that."
But Washington was unlikely to be swayed, he added, with analyst Kim also doubting the US would be "surprised or alarmed". The meeting was Kim Jong Un's first with another head of state since returning from the summit with Trump.
It followed repeated invitations from Putin after Kim embarked on a series of diplomatic overtures last year.
Since March 2018, the North Korean leader has held four meetings with Chinese President Xi Jinping, three with South Korea's Moon Jae-in, two with Trump and one with Vietnam's president.
Soon after his first election as Russian president, Putin sought to normalise relations with Pyongyang and met Kim Jong Il - the current leader's father and predecessor - three times, including a 2002 meeting also held in Vladivostok.
China has since cemented its role as the isolated North's most important ally, its largest trading partner and crucial fuel supplier, and analysts say Kim could be looking to balance Beijing's influence.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ