The Nerazzurri had failed to win at Fiorentina in the league in six attempts since 2014, but goals from Nicolo Barella and Ivan Perisic put an end to that run.
Barella's sublime opener after 31 minutes was added to by Perisic's close-range finish in the second half, but only after Giacomo Bonaventura had struck the crossbar for the mid-table host.
That proved enough as Inter, which was without suspended head coach Antonio Conte, moved a point above AC Milan having played a game more than its bitter rival.
An off-balance Barella was denied by a superb Bartlomiej Dragowski reaction early on but the midfielder found the back of the net from his next attempt.
Inter worked a short corner and Alexis Sanchez set up Barella, who curled an unstoppable shot into the bottom-right corner from 25 yards.
Fiorentina would have been level before half-time if not for Samir Handanovic, who tipped Bonaventura's angled drive onto the bar and saved Cristiano Biraghi's follow-up effort.
Inter doubled its lead when Perisic tapped into an empty net seven minutes into the second half after Achraf Hakimi raced in behind and squared the ball.
Romelu Lukaku, making his 50th start in Serie A, had a goal chalked off soon after, as Perisic was deemed to be offside in the build-up.
Dragowski was then called into action twice in the space of two minutes to save Perisic's drive and substitute Roberto Gagliardini's header from close range.
Inter could not add to its tally but it mattered little as it completed a league double in this fixture for the first time since 2013-2014.