Napoli had lost out on second place in their Champions League Group F to Borussia Dortmund, despite amassing 12 points and wanted their return to domestic duty to be positive on Sunday against Inter Milan.
Coach Rafael Benitez, who had a brief spell at the Nerazzurri in 2010, told Sky Sport Italia: "We left the Champions League with our heads held high, and today I expected a response. We were up against a strong side but it was a great win for us."
Inter were reduced to 10 men in the 71st minute when Ricky Alvarez was shown a second yellow card, for handball, but by then most of the damage had been done.
Mazzarri was mostly applauded by fans of the club he steered to a second place finish last season, but departed feeling less buoyed with Inter now winless in their last four games.
"There were a series of glaring errors that influenced the game, especially the red card. I didn't see Napoli being penalized for many of their fouls," Mazzarri complained. "That was decisive."
Argentinian striker Gonzalo Higuaín opened the scoring for Napoli after just nine minutes when he smashed a volley past Samir Hananovic from the edge of the area.
Inter leveled on 35 minutes thanks to Esteban Cambiasso, only for Napoli to restore their lead four minutes later when Dries Mertens pounced on a loose ball to beat Handanovic with a curling strike at his near post.
Blerim Dzemaili stretched Napoli's lead two minutes later when he tapped home Lorenzo Insigne's perfectly-weighted ball across the face of goal but Napoli were stunned on the stroke of half-time when Yuto Nagatomo reduced arrears.
Inter created several chances in a dramatic second but ultimately failed to capitalize.
Napoli suffered a scare when Rafael was left dazed and requiring treatment after a clash with Fredy Guarin as the Colombian threatened in close following Rodrigo Palacio's cross.
Inter suffered their own blow when Alvarez was red carded and after Napoli coach Rafael Benítez replaced Higuaín with Valon Behrami the hosts stretched their lead further.
Insigne was the provider, the Italy forward firing a perfectly-weighted ball for José Callejón at the back post to tap home past Handanovic in the 81st minute.
Napoli should have had a fifth, after Andrea Ranocchia was judged to have hauled down Goran Pandev, who had replaced Anthony Reveillere in the 91st minute, inside the box. However Handanovic pulled off a superb diving save to beat Pandev's spot kick at his left hand post.
Esteban Cambiasso and Jonathan provided two late goals for Inter Milan in a 2-1 win over visitors Fiorentina on Thursday to move them up to second place in Italy's Serie A.
Fiorentina had started their midweek fixture in fourth place and with one eye on moving to within two points of surprise leaders Roma.
But after Giuseppe Rossi had initially silenced the San Siro by putting La Viola 1-0 up from the penalty spot on the hour mark, new life was breathed into the Milan stadium when Cambiasso levelled 12 minutes later.
Inter, who have started the season brightly under new coach Walter Mazzarri, made it four wins from five games when Jonathan hit the winner seven minutes from time.
Fiorentina rallied and Massimo Ambrosini came close in the dying minutes from close range only to see Inter 'keeper Samir Handanovic pull off a superb save.
Heading into the weekend games Roma sit top with a two-point cushion on Inter, third-placed Napoli and Juventus in fourth, with Fiorentina's first defeat of the season leaving them a further three points off the pace in fifth.
Napoli are in action in one of two games Saturday - the other being Sampdoria's visit to 12th placed Milan - and could regain top spot if they account for Genoa on their away trip.
Inter are away to Cagliari on Sunday, when Juventus visit Torino for the derby while Roma host Bologna.