Icardi scored two and set up another as the home side ended a run of four consecutive defeats against the Viola and sealed a first win for new head coach Stefano Pioli.
Inter took control of the match in a devastating opening 20 minutes, in which Marcelo Brozovic, Antonio Candreva and Icardi all got on the scoresheet to punish a torrid display from the visiting defence.
Nikola Kalinic gave Fiorentina a chance of a comeback with a well-taken goal before half-time, but a contentious red card for Gonzalo Rodriguez promptly put paid to Paulo Sousa's lingering hopes of a much-needed result.
Icardi came close to a second soon after the break but Inter's control on the match began to slip away, especially after Josip Ilicic's shot took an awkward bounce and flew past Samir Handanovic to make it 3-2.
There was to be no repeat of Friday's (AEDT) Europa League collapse against Hapoel Be'er Sheva, however, as Icardi's late tap-in ensured that Inter climb above Fiorentina - having played a game more - and into the top eight.
Inter's flying start saw them take the lead inside three minutes. Icardi's low cross was diverted into the path of Brozovic, and the Croatia midfielder placed the ball into the roof of the net from just inside the area.
Candreva was denied a quick-fire second by a good block from Rodriguez, but the Italy winger had better luck with only nine minutes on the clock as Fiorentina's implosion continued.
Ciprian Tatarusanu palmed Ivan Perisic's cross-cum-shot straight to the feet of Candreva, who could not miss from six yards out.
With San Siro in full voice and the visitors reeling, Inter sensed the chance of an early killing blow and it duly arrived before the 20-minute mark.
Icardi beat the offside trap to collect Candreva's fine throughball and, after turning past the sliding Rodriguez, he skipped beyond a meek challenge from Davide Astori before confidently slotting beneath Tatarusanu.
The visitor did find a lifeline eight minutes before half-time, however, as Kalinic raced onto a fine lofted pass from Milan Badelj and half-volleyed the ball into the ground and past Handanovic for his 10th goal of the season.
But any hope of a comeback was ended in first-half stoppage time. Rodriguez raised an arm to bring down Icardi 20 yards from goal and he was surprisingly given a straight red card by referee Antonio Damato, who seemed to judge it to be a professional foul.
Inter went in search of a fourth and twice came close before the hour mark, Ever Banega being denied by a low stop from Tatarusanu before Icardi's shot was tipped onto the post after a fine run and pass from Joao Mario.
Miranda was fortunate to receive only a booking after raising an arm to the face of Ilicic, but Fiorentina got a stroke of luck when Ilicic's low effort from the left of the penalty area bobbled off the turf and beyond the wrong-footed Handanovic with a little over an hour played.
Inter missed a clear chance for a fourth when Joao Mario cleared the crossbar from only six yards out, but its third victory in nine league games was at last made safe in stoppage time, with Icardi tapping in a rebound after Tatarusanu had denied Perisic's stylish run and shot.