Fagioli has joined Fiorentina on-loan with an obligation to buy.
The Viola will pay an initial €2.5m loan fee and his permanant option is worth €13.5m plus €3m in bonuses.
Fagioli said after signing his Fiorentina contract: "It is sad, because I’ve been at Juventus for 11-12 years now, I was so tied to this club, my teammates, the Juve world and my family, but now I am concentrated and happy for the new experience.
“It was an intense day, as it was all decided in the final 10 minutes. I thank Marseille, because they had faith in me since the start of the window, but I decided to go to Fiorentina after speaking to coach Palladino and the club.
“I thank the Juventus fans for standing by me even during difficult moments and I wish them all the best.”