The 25-year-old, who has won 25 caps for Slovenia, leaves Palermo having made just short of 100 league appearances for the club.
"When I knew Fiorentina was looking for me, I decided I wanted to move to Florence because I think the Viola team is the strongest in Italy and I wasn't interested in others," he told reporters at a press conference.
"I didn't look at other teams, I only looked at Fiorentina. It was good to see them strengthen with Giuseppe Rossi and Mario Gomez.
"The value of the group deserves at least Champions League football. I found it difficult at Palermo because every three months the coach or manager would change."
Ilicic had been linked with a number of European clubs.