The 27-year-old joined the West London club for £18m from CSKA Moscow in 2009 but struggled to hold down regular first-team play, making just 32 starts.
"FC Anzhi has come to an agreement with Chelsea for transfer of the Russian national team player Yury Zhirkov to our club," read a statement on the Russian outfit's official website.
"This morning the newcomer to our team, after a medical check-up, signed a four-year contract."
Speaking to the club's fans ahead of today's game, Zhirkov said: "I am very glad to be here in Makhachkala. I did not expect such reception. It is fantastic.
"I want to thank Anji fans and wish to our team great success today."
Zhirkov was presented to the Anzhi fans before their 2-0 Russian Premier Liga victory over Tromsk yesterday afternoon.