The 28-year-old travelled to Florence earlier on Thursday to undergo a medical and has now completed his move to the Serie A side.
"I would like to thank David Sullivan and David Gold for believing in me and for giving me the opportunity of playing at such a special club like West Ham," Zarate said in a farewell message posted on Twitter.
"I would also like to thank my team-mates for the good times we shared and wish them the very best for the future, and especially I would like to thank from the bottom of my heart all the West Ham supporters for their unconditional support and affection."
Zarate joined West Ham from Velez Sarsfield in May 2014 but was loaned out to QPR halfway through his first season after failing to secure regular first-team action.
The former Lazio and Inter player returned to Upton Park for the 2015-16 campaign and has made 14 appearances, scoring three goals.
Fiorentina have also announced the capture of Tino Costa from Spartak Moscow on loan until the end of the season with an option to make the move permanent come June.
The midfielder, 31, spent 2015 on loan at Genoa but has moved to the Artemio Franchi as Fiorentina aim to boost their chances of qualifying for the Champions League.