Christian Kouame gave the away side an early lead, before Lautaro Martinez opened his account just before half time.
Lautaro was again involved as his low cross deflected off Federico Ceccherini and into his own net. Gaetano Castrovilli got his second in two games to level the match once again.
Then the game swung in the other direction as Federico Chiesa finished a brilliant Frank Ribery through ball to give Fiorentina the lead.
Inter though fought until the end and got their reward when first Romelu Lukaku opened his account in 2020/21, and D’Ambrosio bagged the winner with one minute left to play.
That means Antonio Conte becomes the first Inter coach to win his first match of the season in two consecutive campaigns since Roberto Mancini.
Fiorentina took the lead when a Cristiano Biraghi ball into the box hit Christian Kouame, then fell into the path of Bonaventura who poked the ball back to the striker and he side-footed into the empty net.
Samir Handanovic denied Kouame who was in on goal, while at the other end Inter looked to have won a penalty when Martin Cacares came together with Lautaro.
However, after VAR review, referee Gianpaolo Calvarese overturned the decision as Cacares nicked the ball and Lautaro actually kicked the Uruguayan as he went down.
A brilliant tackle from Ashley Young took the ball from Kouame as he was about to pull the trigger, but the half finished level thanks to an exquisite Lautaro strike which sailed into the top corner from 20 yards.
After the break, Inter got themselves into the lead when Lautaro got past Sofyan Amrabat and fired a low cross into the box which hit Ceccherini and spun into the Fiorentina net.
Excellent hold up play from Franck Ribery allowed Castrovilli to burst into the box and slot past Handanovic.
Another turnaround was complete when Ribery played a fantastic ball through the Inter defence right into the path of Chiesa who dinked it into the net.
Romelu Lukaku should have had a goal when Ivan Perisic delivered a ball right to the feet of the Belgian, but under pressure from Ceccherini, he put the ball wide, when it seemed easier to score.
Lukaku was at it again, this time showing great strength to hold off Ceccherini, but Bartlomiej Dragowski got a touch on the ball and the Belgian’s shot whistled just wide.
Dusan Vlahovic should have killed the game off with 10 minutes to go, when, unmarked, he blasted the ball high and wide from just inside the penalty area.
But at the death, the game was turned on its head when Lukaku turned a Hakimi cross home, then two minutes later D’Ambrosio headed in an Alexis Sanchez corner at the back post.