The 24-year-old Nigerian international spent the past year at Upton Park on loan from Inter and the Italians decided not to retain his services.
According to AFP, Obinna’s agent Tony Adele said: “Obinna has signed a four-year contract with Lokomotiv and he has passed his medical in Moscow.”
The forward will join the Russian club a year after compatriot Peter Odemwingie left for West Brom, with the striker subsequently the subject of racist abuse from sections of the Lokomotiv support.
Obinna was unable to stop West Ham from being relegated this year and was never a pivotal figure at the club.
He has scored eight times in 38 international appearances for Nigeria since his debut at the 2006 African Cup of Nations.
He signed for Inter in 2008 after playing at Serie B side Chievo for three years but only made nine appearances for the Milan club.
Before his spell at West Ham, he was loaned out to Malaga in the 2009-10 season, where he made 26 appearances and scored four goals.