The Italy midfielder scored his first with a lucky ricochet with just three minutes to go after playing a one-two with Mirko Vucinic before making the game safe deep into injury time, firing a 25-metre volley through the legs of goalkeeper Christian Abbiati.
A brilliant Vucinic had come closest with a string of chances either side of halftime against a Milan side that had offered little in attack and were reduced to 10 men when Kevin-Prince Boateng was sent off in the dying stages.
Earlier on Sunday, Udinese beat Bologna 2-0, while victories for Cagliari and Palermo helped the island teams join Napoli within a point of the leaders.
Short link: