Spalletti’s men dominated the first period and took a first half lead through Icardi. AC Milan were much improved in the second half, and equalised twice through Suso and Giacomo Bonaventura, but Icardi’s goalscoring prowess proved too much, and he secured the win in injury time from the penalty spot.
Of the two Milan sides it was Inter who started the brighter, dominating possession in the early stages but creating little in terms of real chances.
The first real sight of goal came for the home side, Antonio Candreva curled a shot goalwards from 20 yards out, but his right-footed effort crashed against the crossbar and bounced over.
The game was rather scrappy, with a number of players from each side picking up bookings for late challenges and needless trips.
It was largely one-way traffic as Borja Valero’s dangerous inswinging free-kick from deep was hastily cleared to Ivan Perisic, who crossed back into the box and Miranda headed narrowly wide for the hosts.
Luciano Spalletti’s side then got the goal which their positive play had threatened after 28 minutes. Candreva curled a brilliant low ball into the box from the right and Icardi found space between the two AC defenders and Icardi provided a deft touch to send the ball past Gianluigi Donnarumma and give Inter a deserved lead.
The Nerazzurri continued to threaten through Icardi and Matias Vecino, who both forced Donnarumma into fairly routine saves.
Despite the distinct lack of any threat throughout the half, AC Milan almost found an equaliser just before the break. After some neat footwork, Franck Kessie played in Fabio Borini down the right, and the winger smashed a low first-time effort goalwards. Samir Handanovic got down well to save, and Borini could only head the rebound into the side netting from a tight angle.
Vincenzo Montella decided to make a change at the break, bringing on striker Patrick Cutrone in place of Kessie and the change in shape looked to work perfectly.
From the start of the second period, AC Milan looked like a different side, playing with more purpose and much more of a threat in the final third. Andre Silva hit the post from inside the box, and Mateo Musacchio found the back of the net with the rebound, but was ruled out for offside.
Suso and Borini then tested Handanovic twice in quick succession with efforts from outside the box, before Cutrone hit the side netting, after getting in front of the Inter defender at the front post to meet a cross from Ricardo Rodriguez.
The Rossinero eventually found their equaliser on 56 minutes in fine fashion after a peppering the Inter goal since the break. Suso cut inside onto his left foot before curling a superb effort into the far corner from 20 yards out, giving Handanovic no chance.
Following the equaliser, the game was end to end. Vecino came close for the home side, curling an effort wide from 18 yards out, before Bonaventura’s low shot drew a good save from Handanovic.
After 64 minutes Inter Milan had restored their lead, once again through Icardi. Perisic ran at Musacchio before cutting the ball back from the byline, and Icardi improvised excellently by slicing a volly across Donnarumma to score his second of the game.
Once again the game was back and forward, AC Milan putting up much more of a fight than in the first period, and they had another late equaliser.
Borini’s looping cross evaded everyone except Bonaventura at the back post, who slid in to direct the ball goalwards and, despite Handanovic’s best efforts, the ball crossed the line to level the scores with just under 10 minutes to play.
However, Icardi was not finished.
Both sides were going for the winner, as a long range effort from Rodriguez drifted harmlessly wide and an effort from Eder was deflected over, after an excellent run from Vecino.
Icardi was given perfect the chance to win the game for the home side and round off his hat-trick when the referee pointed to the spot after Rodriguez dragged D’Ambrosio to the ground from an Inter corner.
With 90 minutes on the clock, Icardi calmly dispatched the penalty to secure an Inter Milan victory at the Stadio Giuseppe Meazza and ensure the match ball was going home with him.
The victory extends Inter’s excellent start to the season under Spalletti, having won seven and drawn one of their eight Serie A games, and they remain just two points behind league leaders Napoli.
Meanwhile, the pressure on Montella will surely mount after this derby day defeat, as the Italian coach has now lost four of his first eight Serie A games in charge of the Rossoneri, after a heavy summer of transfer spending.