Announcing the deal on Thursday, Malaga said on their website the deal included an option to make the transfer permanent next summer.
A club statement said: "Malaga Football Club have reached an agreement with Fiorentina to incorporate into the squad the striker of Moroccan origin Mounir El Hamdaoui."
Rotterdam-born El Hamdaoui, 29, struggled for goals in Italy last term, having been rescued from Ajax, where he had fallen out of favour with manager Frank de Boer to the effect he had played no first-team football for a year.
He had made his reputation as a dangerous striker when he finished top scorer in the Eredivisie in 2009, playing for AZ Alkmaar in their championship-winning side, also earning player of the year honours in Holland.
Malaga said El Hamdaoui passed his medical on Wednesday morning and has now signed his contract with the club.