Joaquin, who will be 32 next month, began his professional career at Real Betis and joined Malaga in 2011 after a five-year stint at Valencia.
He became a firm favourite with the fans and scored several vital goals on the Qatar-owned club's run to the last eight of the Champions League last season.
Neither club disclosed financial details of the deal.
"Malaga would like to thank Joaquin for his dedication, professionalism and commitment to the club and wish him good luck in his first professional experience outside Spain," the club said on their website (www.malagacf.com).
Fiorentina finished fourth in Serie A last season and qualified for the Europa League, the continent's second-tier club competition.
- Sports & Recreation
- Real Betis