The Morocco international was surplus to requirements at the Eredivisie champion, and will now continue his career in Serie A.
The Serie A side was keen to bolster its attacking options ahead of the 2012-13 campaign, and new head coach Vincenzo Montella has now received the new striker he was looking for.
El Hamdaoui was close to joining La Viola in the January transfer window, but the move fell through for financial reasons.
The 27-year-old started his professional career with Excelsior and also played for Tottenham, Derby County, Willem II and AZ before joining Ajax in the summer of 2010.
The Morocco international failed to make an impact at the Amsterdam giant, though, after falling out with head coach Frank de Boer. He last featured in an official game for Ajax on April 24, 2011.
Goal.com has a new podcast! Goal Daily Podcast is a MUST for all Soccer fans and discusses the very latest news and views. What’s more when you sign up the service is FREE for the first month and you can cancel anytime.
Follow GOAL.COM USA on