Rangers signed the 29-year-old from the Russian side in January for £12m, but the stopper was unable to prevent the club from being relegated from the Premier League.
Although the fee has not been revealed, QPR have said that it is a record sum received by the club for a player.
A statement on the QPR website read: "Christopher Samba has today rejoined Anzhi Makhachkala for a club record undisclosed fee.
"The club would like to wish Chris all the best for the future and thank him for his contribution to QPR during his spell in W12."
Samba made 10 appearances for the West London club.