The 29-year-old only joined the Italian club on a three-year deal in July 2012, but has now been farmed out to La Liga as Bernd Schuster looks to bolster his attacking options.
He will now hope to help Malaga turn things around after they kicked off the new campaign with 1-0 defeats to both Valencia and Barcelona.
El Hamdaoui began his career in the Netherlands with Excelsior, scoring 32 goals in 74 appearances for the Dutch club prior to moving to England with Tottenham.
However, the forward's time in the Premier League was largely disappointing and, after a brief loan spell with Derby County, he returned to the Eredivisie for stints with Willem II, AZ and Ajax.
A rift with Ajax boss Frank de Boer saw El Hamdaoui move on to Fiorentina but, after plundering three goals in 20 appearances last term, he has now been moved on.
Dutch-born El Hamdaoui has been capped on five occasions by Morocco since making his debut in 2009, and has two international goals to his name.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.