Diarra spent much of his earlier career in the English top-flight having originally left Le Havre for Chelsea in 2005, before going on to play for Arsenal and under Redknapp at Portsmouth.
During his time in England Diarra won the Premier League, League Cup and Community Shield, while he also has two FA Cup winner's medals.
Diarra had been in Russia since leaving Real Madrid for Anzhi Makhachkala in August 2012 and he cost Lokomotiv a reported €12 million a year later.
The 29-year-old France international was reportedly sacked by Lokomotiv following a falling out with coach Leonid Kuchuk and he looks set to bolster QPR's midfield options.
Redknapp told the BBC: "We are looking around [for new players]. We have bought some good players but we have some more irons in the fire.
"Lassana [Diarra] has signed and I'm delighted to have him. I had him at Portsmouth and he is a terrific player."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.