Russian President Vladimir Putin`s decision to grant pardons to Yuriy Soloshenko and Gennady Afanasyev was not explained by the Kremlin.
However, Moscow said separately that two Ukrainian reporters - Yelena Glishchinskaya and Vitaly Didenko - who were accused of spreading pro-Russian propaganda in Ukraine, had also been released.
The Kremlin press office also said the releases were "made possible by thanks to the active involvement of Vikor Medvedchuk" - a Ukrainian whose personal friendship with Putin is said to have been instrumental in allowing the exchanges to go ahead.
On their arrival in Kyiv on Tuesday, both Afanasyev and Soloshenko were sent to hospital for treatment for chronic ailments that required immediate care.
Their release was greeted by Ukrainian President Petro Poroshenko, who met the pair.
"My dear boys, welcome home!! Poroshenko told the two after they had arrived at the hospital, adding: "We did it!"
More about: