Mr Yanukovych flew from China to Sochi in southern Russia for the meeting. He also cancelled a visit to Malta.
Last month he shelved a partnership deal with the EU, triggering angry protests in Ukraine's capital Kiev.
Jailed opposition politician Yulia Tymoshenko has reportedly called off a prison hunger strike.
The former prime minister's daughter, Eugenia, said her mother had accepted a request from protesters in Kiev to stop the fast.
She had reportedly begun the hunger strike on 25 November in protest at Mr Yanukovych's failure to sign the EU deal.
Thousands of anti-Yanukovych protesters remain outside the government building on Kiev's Independence Square, braving bitter cold.
They are furious that he made an 11th-hour U-turn in relations with the EU, refusing to sign the association agreement that had been prepared during years of negotiations.
In Sochi, Mr Yanukovych discussed "preparation of a future treaty on strategic partnership" with Russia, his press service said.
The talks covered various economic issues, the statement said, without elaborating.
Mr Putin has been urging Ukraine to join Russia's customs union with Belarus and Kazakhstan - a union whose entry terms are far less demanding than the EU's.
In recent months Russia has put Ukraine under economic pressure, imposing long customs delays at the border and banning imports of Ukrainian sweets.
Arseniy Yatsenyuk, a Tymoshenko ally and leader of the main opposition faction in parliament, condemned the talks in Sochi.
"Their attempts to sell Ukraine to Russia have not ended in any way," he said.  "If Yanukovych tries to sign anything with Russia about the customs union it will lead to a bigger wave of protests."
Ukraine's President Viktor Yanukovych and his Russian counterpart Vladimir Putin have held surprise talks on a "strategic partnership treaty".