A superb long-range Fabio Quagliarella strike after three minutes and a tap in from Alessandro Matri on the hour were just enough for Juve to beat a determined Inter, who briefly levelled the scores on 54 minutes through Rodrigo Palacio.
"It was a game played at a great pace right from the start and it's an important win for us. Now we can think about Bayern," Juventus striker Matri told Sky Italia as he looked ahead to Tuesday's Champions League quarter-final first leg at Bayern Munich.
"We can't relax until we're mathematically certain of winning [the scudetto], but today we sent a signal out that we're still concentrated on the league."
Quagliarella gave champions Juve an early lead against Inter with a stunning long-range strike that dipped and swerved over a stationary Samir Handovic in the Inter goal.
Palacio gave Inter fans hope they might let Napoli back into the title race when in the 54th minute he raced onto Antonio Cassano's smart pass and rolled home an easy finish.
But Matri regained the lead only six minutes later when he met a Quagliarella cut back from the byline to tap in from close range and move Juve a step closer to what looks like an inevitable title.
Second-place Napoli maintained their feint title hopes thanks to two goals from Cavani and an exceptional Blerim Dzemaili hat-trick.
Cavani, a late substitute, snatched an incredible win for Napoli, who came back from 3-2 down to win with three goals in 10 exciting second-half minutes.
They are now on 59 points, nine behind leaders Juventus.
Napoli took the lead through Dzemaili on ten minutes, when the former Torino midfielder smashed a powerful long-range shot through a crowd of bodies past Jean Francois Gillet in the Torino goal.
Paulo Barreto levelled the scores on the half-hour with his first goal in 882 days.
Dzemaili gave Napoli the lead again two minutes after the break with another tidy finish, but Cavani, who had been dropped to the bench after returning late from international duty, gave away a penalty when he handled from a corner.
Cristian Jonathas tucked away the spot-kick with 16 minutes remaining and Napoli looked to have thrown the title away when substitute Riccardo Meggiorini rounded Antonio Rosati in the Napoli goal and calmly gave them the lead four minutes later.
Dzemaili completed his hat-trick on 80 minutes with a sublime strike curled in with the outside of his right boot, before Cavani went from villain to hero with two goals in six minutes.
He whipped a fantastic free-kick past Gillet to give Napoli an unlikely lead, before heading his second in the last minute to seal the win.
Inter, who had Esteban Cambiasso sent off in injury time for a rash tackle on Sebastian Giovinco, remain on 47 points and drop down to sixth after a 2-1 win against fellow European hopefuls Catania saw Lazio move above them into fifth place.
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.