Massimiliano Allegri's team were given a run for their money, but their star striker once again delivered a world-class performance to secure the three points
Pablo Osvaldo opened the scoring in the first half, but the Rossoneri responded with a brace from Zlatan Ibrahimovic after the break as Massimiliano Allegri's team recorded three vital points in preparation for Wednesday's Champions League quarter-final tie with Barcelona.
Milan started the game brightly, dominating possession and pressing the opposition deep in their own half. Urby Emanuelson was the first to threaten Maarten Stekelenburg's goal in the eighth minute when he saw a low shot from the right wing saved by the Netherlands international.
However, the Rossoneri received a blow in the 10th minute as Thiago Silva was forced to leave the pitch after suffering a muscle injury. But it did not stop Milan's attacking momentum as Massimiliano Allegri's men continued dominating proceedings.
Ibrahimovic forced Stekelenburg into a fine save in the 11th minute with a powerful free kick and moments later Stephan El Shaarawy narrowly missed to the left with a skilful volley from inside the penalty area.
The tempo dropped in the following minutes as most of the action commenced in the centre of the pitch. Roma, however, were slowly improving and looked more threatening on the counter.
In the 40th minute El Shaarawy rattled the post with a superb strike from outside the box, and the rebound fell to Antonio Nocernio, who failed to connect cleanly with the ball to convert. Milan were tightening the grip on Roma, but against the run of play the Giallorossi took the lead in the 44th minute.
A long-range strike by Daniele De Rossi was deflected by Osvaldo into the net from just outside the six-yard box as Christian Abbiati was caught by surprise. The goal meant the Rossoneri had to withdraw at half-time with a one-goal deficit, much to the dismay of fans and players alike.
The restart saw Roma continue to take advantage of mistakes by the hosts in the build-up of their attacks. In one such instance, Abbiati gifted the ball to Francesco Totti with a stray pass, but luckily for the goalkeeper the Roma veteran could not find the target with his chipped effort.
El Shaarawy saw a powerful shot blocked in the following attack, but the real trouble for the Giallorossi was yet to come. In the 51st minute De Rossi handled the ball in the box and conceded a penalty, which Ibrahimovic duly converted to draw the game level.
AC Milan continued to press forward in the remainder of the game, but were repeatedly frustrated in their search for a winner. Sulley Muntari struck the bar with a powerful finish, but it was Ibrahimovic who bagged the winner in the 83rd minute when he powered past Stekelenburg and Simon Kjaer to complete his brace with a simple finish.
Following the win, AC Milan move to 63 points at the top of the Serie A table, while Roma sit sixth with 45 points. The Rossoneri host Barcelona on Wednesday for the first leg of the Champions League quarter-finals, before visiting Catania in the league next week, while the Giallorossi host Novara.