The win leaves Roma five points clear of Napoli, who could be overtaken in second by Juventus, who face Fiorentina on Sunday.
Pjanic, fresh from helping Bosnia to a first ever FIFA World Cup finals, curled a sumptuous free-kick home with the last kick of the first half, after Daniele De Rossi had cleared a goalbound Goran Pandev effort off the line.
Paolo Cannavaro, who had conceded the free-kick, fouled Marco Borriello in the penalty area with 20 minutes left in the game, earning him a second yellow card, allowing Pjanic to lash home his second from the spot.
In-form duo Gervinho and Alessandro Florenzi continued in support of Francesco Totti in attack for Roma, while Gonzalo Higuain failed a late fitness test for the visitors and had to make do with a place on the bench, although Christian Maggio returned at right-back.
Roma made most of the early running and had two chances to take the lead in the 19th minute, but De Rossi headed a corner straight at Pepe Reina, while Gervinho wastefully blazed wide as he closed in on goal.
Totti was forced off with 10 minutes to go in the opening period, Borriello coming on in his place, and they almost went a goal down moments later.
A swift Napoli counter-attack saw Pandev closing in on goal, the Macedonian's weak effort was parried by Morgan De Sanctis, but regardless looked destined to trickle in, only for De Rossi to charge back and acrobatically hack the ball clear.
An injury for Miguel Britos brought Cannavaro into the game, but the Napoli club captain had a disastrous impact on the game.
The defender cynically fouled Gervinho as he looked to dart goalwards, and Pjanic stepped up, curling the set-piece over the wall and into Reina's top right-hand corner.
Napoli roared back after the break with Gokhan Inler flashing an effort just wide and Marek Hamsik clipping the crossbar, but Roma retained a threat, with Kevin Strootman whistling a long-range effort just over.
And with 70 minutes on the clock, the hosts had their second. Cannavaro hauled down Borriello in the area, for his second booking of the evening and a second foul leading to a goal as Pjanic smashed the spot-kick into the roof of the net.
The goal and dismissal were ultimately too much for the visitors to recover from, as Roma comfortably saw out their eighth win from as many Serie A games this term and in the process inflicted Rafael Benitez's first league defeat as Napoli boss.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.