Neither team could force the issue by half time and, despite both sides weighing in with numerous chances throughout the second half, the standard 90 minutes finished goalless.
The deadlock was eventually broken in the 104th minute as Patrick Cutrone sprung the offside trap to latch on to a ball over the top from Suso before slotting past Handanovic from 10 yards.
The Nerazzurri could not find an equalise and were duly knocked out of the competition, while Milan go on to face Lazio in a two-legged semi-final next month.
AC Milan (4-3-3): Donnarumma; Abate (Calabria 54'), Bonucci, Romagnoli, Rodriguez; Kessie, Biglia, Locatelli (Calhanoglu 73'); Suso, Kalinic (Cutrone 75'), Bonaventura
Inter Milan (4-2-3-1): Handanovic; Cancelo, Skriniar, Ranocchia, Nagatomo; Vecino, Gagliardini (Brozovic 75'); Candreva (Eder 100), Mario (Valero 67'), Perisic; Icardi