The 25-year-old joined Fiorentina last summer in a £6.8million move from Spanish side Almeria.
Melo has in recent weeks been strongly linked with a move to Premier League side Arsenal.
“Fiorentina announces that its sporting director Pantaleo Corvino met in Milan with Felipe Melo’s agent and an agreement was reached to extend the player’s contract until 2013 with a buy-out clause also included,” read a statement from the club.