Marek Hamsik curled home the decisive strike on 72 minutes to hand Walter Mazzarri a crucial ninth victory of the season. It was cruel on Cagliari, who caused the visitors plenty of problems and will feel aggrieved at coming away empty handed.
Cagliari made two changes from the side that drew 2-2 with Inter last weekend. Lorenzo Ariaudo came in for the suspended Davide Astori, while Thiago Ribeiro deputised for the injured Andrea Cossu in midfield. Nene was still sporting a bandage above his eye, following last weekend's clash of heads with Inter's Juan Jesus.
For the visitors, Hamsik partnered Lorenzo Insigne up front to cover for the suspended Edinson Cavani and injured Goran Pandev.
The home side had the best of the first 15 minutes. Nene saw Morgan De Sanctis off his line and sent an auspicious long distance lob over the bar. Albin Ekdal's ball then found the frontman, whose shot on the turn was blocked by Alessandro Gamberini.
Napoli finally settled and had two chances in quick succession halfway through the first period. Ariaudo stood off Insigne as he drove forward and sent a shot off the post with Michael Agazzi well beaten. The ball trickled across the line, but no-one was on hand to pick up the rebound.
Cagliari then switched off during a free kick. Gokhan Inler fed Valon Behrami who was given licence to run into the box. The Swiss midfielder rolled the ball across to Insigne, who went for a fancy flick when a simple shot would have sufficed.
On the half hour mark, Daniele Conti went down under Gamberini in the box, but was denied a penalty. Replays showed it was the correct call.
A quick counter attack by the visitors allowed Blerim Dzemaili to spray a ball across to Insigne, but his shot hit the side netting.
Marco Sau went down under Paolo Cannavaro in the box and was booked for diving. The Napoli captain then deflected a Sau shot over. From the resulting corner, Conti rose above Gamberini to head onto the post, with the ball bouncing above Behrami and nearly creeping in.
In stoppage time, De Sanctis slipped as he took a goal kick. Danilo Avelar tried his luck from 40 yards and sliced a half volley just over the bar.
Straight from the restart, Radja Nainggolan squirmed past two markers to force De Sanctis into a low save.
Cannavaro almost turned Conti's dangerous low cross into his own net as the ball hit his boot and bounced onto the bar, with De Sanctis left scrambling back.
Cagliari continued to press. On 55 minutes, Ekdal's sublime control and pull back found Nainggolan, who struck a first time shot just wide from outside the penalty area.
Napoli made changes. Eduardo Vargas almost made an immediate impact, getting his head on a corner, only to see Francecso Pisano clear it off the line.
With 18 minutes left to play, the visitors took the lead. Cagliari didn't clear their lines as the ball bounced around the box. It fell to Hamsik who curled into the bottom corner from six yards out. Replays suggested he was marginally offside, but the goal was allowed to stand.
Substitute Pablo Ceppelini flashed over from just inside the box, while Hamsik put Conti under pressure forcing the Cagliari captain to snatch at his shot, which went wide.
Agazzi bravely put his body on the line, sliding in the way to deny Vargas from slotting home in stoppage time.
Cagliari: Agazzi; Pisano, Rossettini, Ariaudo, Avelar; Ekdal, (Ibarbo 80) Conti, Nainggolan; Thiago Ribeiro; (Ceppelini 83) Sau, Nene (Dossena 88)
Napoli: De Sanctis; Britos, Cannavaro, Gamberini; Maggio, (Mesto 65) Inler, Behrami, Dzemaili, (Vargas 68) Zuniga; Insigne, (Dossena 83) Hamsik
Goal: Hamsik 72 (6)