Palacio poked home his 11th goal of the season in the 34th minute and fellow Argentine Icardi came off the bench to sweep home Yuti Nagatomo's cross with a deft finish after 65 minutes.
Icardi's winner came after the lively Juan Cuadrado levelled for Fiorentina with a deflected shot seconds after the break, the 20-year-old Inter striker deemed just onside to score three minutes after replacing compatriot Diego Milito.
Fiore substitute Alessandro Matri almost grabbed an equaliser at the death when he screwed the ball wide from close range but Inter held on to pick up all three points.
"I think Inter deserved to lead in the first half. They played better than us," said Fiore coach Vincenzo Montella.
"But that changed in the second half when we had the match in our hands after equalising, and we objectively suffered some bad luck," he added referring to Icardi's controversial goal.
Fiorentina missed a chance to move level with Napoli, who occupy the last Champions League qualifying place, after a disappointing display that even the return of striker Mario Gomez off the bench after five months out could not salvage.
Inter's victory also moved them three points ahead of surprise package Hellas Verona, who host fellow Europa League qualifying hopefuls Torino on Sunday (1945 GMT).
"We were brilliant today but we risked throwing it all away because we wasted so much in the first half, and if you do that at teams like Fiorentina anything can happen," said Mazzarri.
"We need to improve. Playing well for me doesn't mean giving your opponents opportunities. If we had put our chances away in the first half then it would have been a more convincing result and we wouldn't have suffered."
Inter were far the better side in the first half and, had Milito not twice shot weakly on the counter with better options to his left the visitors may have reached the break with a bigger lead than that given to them by Palacio.
The Argentine neatly took down Fredy Guarin's chipped through ball and toed the opener past onrushing keeper Neto to score his first goal since winning the Milan derby with a dramatic late strike before the winter break.
"The important thing is that we won, we played really well and we're all happy. We need to carry on playing like this," said Palacio, who hit the post before opening the scoring.
"It won't be easy getting a place at the World Cup, Argentina has some great attackers. I can only do my best here at Inter and then we'll see."
The home side came out firing in the second half and immediately grabbed an equaliser when Cuadrado's weak shot was deflected off Juan Jesus and squirmed under keeper Samir Handanovic's hand.
But Inter always looked dangerous on the break and grabbed a precious win with Icardi's strike to end an awful run of away results and keep alive their slim hopes of finishing third and securing a Champions League qualifying place for next season.