The former Manchester City player passed a medical on Monday and is likely to be a direct replacement for Miranda, who joined Inter earlier this summer.
A statement on the club's official website from sporting director Jose Luiz Caminero said: "We are very satisfied with the agreement reached with Fiorentina because Stefan is a player with a great future ahead of him.
"He's fast and strong defensively and has experience despite his youth after playing in Serbia, England and Italy. I am convinced that he will bring a lot."
The 24-year-old began his career at BSK Borca, before moving on to Partizan, City and Fiorentina in 2012.