Vincenzo Montella's men bounced back from their controversial defeat at home to Napoli by claiming a deserved victory at the Giuseppe Meazza that lifted them up to fourth
Juan Manuel Vargas' deflected 27th-minute free kick set the visitors on their way, the ball clipping the shin of Sulley Muntari in the wall before spinning beyond a wrong-footed Gabriel in the Rossoneri goal.
Milan pressed hard in the second half but Borja Valero tapped home from close range with 17 minutes left to put the result beyond doubt as Fiorentina racked up its third successive win over the hosts.
Allegri’s side has now lost five of its opening 11 league matches and already faces an uphill battle to climb towards the Champions League places.
Milan made just one change to the side that drew 1-1 with Lazio in midweek, as Kevin Constant replaced Mattia De Sciglio, while Fiorentina made five alterations. The suspended Juan Cuadrado was forced to miss out following his dismissal against Napoli on Wednesday, with Spanish winger Joaquin among those dropping to the bench.
It took quarter of an hour for either side to fashion any sort of chance, Cristian Zapata powering his header over the crossbar from six yards after running onto Kaka's corner at pace.
As the half wore on, the game began to open up and the hosts looked more threatening, Kaka feeding Muntari on the edge of the box after 21 minutes, but the Ghanaian's weak shot was comfortably saved by Neto low down to his left.
Six minutes later, the visitors took the lead with their first effort of note. Vargas' driven free-kick from 25 yards took a deflection off Muntari standing in the wall, with the ricochet diverting the ball's path just enough to defeat Gabriel and nestle in the bottom left-hand corner.
There were few chances of note for the remainder of the half, and the opening 15 minutes of the second half proved similarly uneventful, notable only for a booking for Mario Balotelli when the Italy international shoved Neto to the floor as the goalkeeper shielded the ball out of play.
The incident was one of several altercations between Balotelli and Fiorentina's players, the striker cutting an increasingly frustrated figure as Milan failed to break down its opponent.
And, with time running out, Valero added to Milan's woes, the Spaniard slotting home from six yards after Gabriel had parried substitute Joaquin's right-wing cross into his path.
Ryder Matos went close to adding to the misery for the hosts, sending an effort a yard wide from the edge of the box with five minutes to go, but it mattered little as Fiorentina comfortably held on to pile the pressure on Milan and Allegri.