The 36-year-old departed the San Siro at the end of last season and has held talks with West Ham, whilst clubs in MLS have also been linked.
However, a deal with Fiorentina now looks close, his agent Moreno Roggi told Radio Blu: "We are close to defining something.
"He will enter a new group and be ready to take whatever role is asked of him.
"Florence is a really beautiful town and the club has a big project."
Meanwhile, Fiorentina have made a move for Swiss keeper Yann Sommer - according to his club Basel.
"We have had only one concrete offer for Sommer and it arrived from Florence," Basel sporting director Georg Heitz told Derbrund.ch.
"It's possible that he could leave in summer, even if we have not thought about who could replace him."