Cristiano Ronaldo blasted in the first goal from a corner on 64 minutes in Reggio Emilia, before Napoli captain Lorenzo Insigne missed a penalty and Alvaro Morata added a second deep into injury time.
Juventus won the annual trophy, played between the league champions and Italian Cup holders, for the ninth time, having finished runners-up last year to Lazio.
Pirlo won his first silverware five months after taking over at his former club.
It was the first meeting between Pirlo and Napoli coach Gennaro Gattuso, who won the 2006 World Cup together and spent a decade as AC Milan teammates, winning two Serie A titles and two Champions League crowns together.