Moscow has accused the fishermen of poaching in its waters and ignored demands from Tokyo to release them.
The Russian coast guard handed over the fishermen to a Japanese boat after a two-hour meeting at sea, a Japanese foreign ministry official said on Wednesday.
“Akiyoshi Kawamura and Haruki Kamiya have been released,” he said.
But the skipper, Noboru Sakashita, and his boat remained in Russian custody, he said.
On August 16, Russian troops shot dead a 35-year-old Japanese crab fisherman and detained three of his shipmates in contested waters off Japan’s northern island of Hokkaido.
The three surviving crew members were detained on Kunashiri island, one of four Kuril islands seized by Soviet troops from Japan at the end of the second world war.
Russia said the gunfire was meant to be a warning shot, and expressed regret for the death.
Sakashita will be put on trial on September 7, a spokesman for the border guards in the eastern Russian region of Sakhalin told a Russian news agency this week.
He faces up to two years in prison and a fine of $18,700 if found guilty.
The dispute over the islands has prevented the two nations from signing a peace treaty formally to end the war.
Soviet troops took the Kuril islands in 1945 and expelled all the residents.
A series of talks since the collapse of the Soviet Union has failed to make any headway. Recently, Japan refused an offer by Vladimir Putin, the Russian president, to turn over two of the islands.
The dispute has also discouraged investment in Russia by Japan, the world’s second-largest economy.
In a statement on Monday, the Russian foreign ministry warned Japan to keep its fishermen out of its waters.