A St James' Park crowd of more than 50,000 unsurprisingly took great delight in seeing former midfielder Joey Barton put the Black Cats boss - who was booed throughout - on his backside in the second half.
However, with the match finishing goalless the Italian had the last laugh as he scored from the spot along with Alessandro Costacurta as the visitors won 2-1 after only Alan Thompson could convert for the Magpies.
A host of former stars turned out to celebrate Harper's 20-year spell at Newcastle which ended in the summer when the 38-year-old goalkeeper departed for Hull.
The home side had the likes of Peter Beardsley, Andrew Cole, Faustino Asprilla, Alan Shearer, Les Ferdinand and David Ginola among their considerable number.
Milan brought, among others, Paolo Maldini, Franco Baresi, Mark van Bommel and Gianluigi Lentini.
Harper is donating proceeds from the match to several north-east charities, including the Sir Bobby Robson Foundation.