The Soviet government of the Russian Soviet Republic (RSFSR) decriminalised homosexuality in December 1917, following the October Revolution and the discarding of the Legal Code of Tsarist Russia.
The legalisation of homosexuality was confirmed in the RSFSR Penal Code of 1922, and following its redrafting in 1926. According to Dan Healey, archival material that became widely available following the collapse of the Soviet Union in 1991 "demonstrates a principled intent to decriminalize the act between consenting adults, expressed from the earliest efforts to write a socialist criminal code in 1918 to the eventual adoption of legislation in 1922.
The legalisation of homosexuality was confirmed in the RSFSR Penal Code of 1922, and following its redrafting in 1926. According to Dan Healey, archival material that became widely available following the collapse of the Soviet Union in 1991 "demonstrates a principled intent to decriminalize the act between consenting adults, expressed from the earliest efforts to write a socialist criminal code in 1918 to the eventual adoption of legislation in 1922.
Taken from here