The Rossoneri, playing their first game under new head coach Gennaro Gattuso, took the lead against the league's basement side in the 38th minute of the match.
Giacomo Bonaventura was in the right place to connect with a Franck Kessie cross, sending a header goalwards and, although the initial effort was cleared off the line, the 28-year-old pounced on the rebound.
Benevento levelled on 50 minutes when Gaetano Letizia's initial effort was kept out by a brilliant Gianluigi Donnarumma reaction save, only for the ball to drop to George Puscas, who poked home from close range.
The Rossoneri edged back ahead just seven minutes later through a poorly-cleared corner that was worked back towards Nicola Kalinic, who made no mistake in heading into the net from six yards.
Gattuso's charges then found themselves down to 10 men when Alessandro Romagnoli was shown a second yellow card in the 75th minute for a foul on Letizia.
However, Roberto De Zerbi's charges struck back at the death through goalkeeper Alberto Brignoli, who came up for a corner in the fifth minute of injury time and smashed a diving header beyond Donnarumma in the Milan goal.
Benevento (4-1-4-1): Brignoli; Letizia, Djimsiti, Costa, Di Chiara (Gyamfi 79'); Memushaj (Coda 80'), Chibsah, Cataldi; D'Alessandro, Puscas, Parigini (Brignola 67')
AC Milan (3-4-2-1): Donnarumma; Musacchio, Bonucci, Romagnoli; Borini (Abate 60'), Kessie, Montolivo (Biglia 73'), Rodriguez, Suso (Zapata 87'), Bonaventura; Kalinic