But Juve took the lead after just six minutes, Khedira playing a one-two with Miralem Pjanic after a powerful run through midfield and beating goalkeeper Rafael from close range.
Hamsik levelled for Napoli by finishing off a Dries Mertens throughball and the Belgian almost put his side in front only to be denied by the post, with neither side able to find a winner.
The draw will be welcomed more by Juve, who move six points clear of Roma with eight league games remaining as they seek a sixth straight title, while Napoli are four points ahead of fourth-placed Lazio in the battle for Champions League qualification.
The two sides will meet again at Stadio San Paolo on Wednesday for the second leg of their Coppa Italia semi-final, with Juve holding a 3-1 lead from the first game in Turin.
9 - Juventus have scored nine league goals in the first 10 minutes of play this season, record in the Serie A 2016/17. Start. #NapoliJuve— OptaPaolo (@OptaPaolo) April 2, 2017
Napoli were dealt a blow when Pepe Reina, who had started every league game this season, could not recover from a calf injury to take the gloves and replacement Rafael was beaten by the first shot of the match after six minutes.
Khedira collected a loose ball in midfield and burst through two weak Napoli challenges before swapping passes with Pjanic and slotting a low first-time shot through Rafael's grasp to score his fifth goal of the season.
Hamsik drilled a good chance off-target after Napoli pressure forced a loose Giorgio Chiellini pass and the midfielder lashed another clear opening wide of the post on the half-hour.
Napoli continued to press against a deep-lying Juve defence and Mertens should have done better after finding space in the box, the forward instead shooting straight at Gianluigi Buffon.
A rare Juve attack saw Mario Lemina lash an effort wide, before Lorenzo Insigne went close with a curling strike and Napoli had the ball in the net after 55 minutes but the goal was correctly disallowed for offside.
Jose Callejon tapped the rebound home after Buffon blocked a Mertens shot with his legs and the attacker was clearly beyond the last defender, but Napoli would not be denied on the hour mark.
A neat reverse pass from Mertens freed Hamsik as the pair swapped passes and the captain made no mistake with a blasted finish into the roof of the net, giving Buffon no chance.
Napoli were then gifted a golden opportunity to take the lead when a poor Kwadwo Asamoah backpass sent Mertens through on goal, but the attacker could only hit the post from a tight angle after beating Buffon to the ball.
Higuain endured a quiet game and was whistled mercilessly by the unforgiving home supporters as his goalless run extended to five games, but the point is more useful to Juve than Napoli.
Key Opta stats:
- Juventus have drawn from a losing situation for the first time in Serie A this season.
- Juventus have scored nine league goals in the first 10 minutes of play this season, a record in Serie A in 2016-17.
- Gianluigi Buffon played his 615th game in Serie A, only Paolo Maldini played more matches in the history of the Italian top flight.
- Juventus have conceded only four goals in their last 11 Serie A games (W9 D2).
- Marek Hamsik reached 350 Serie A appearances and Elseid Hysaj 100.
- Sami Khedira has scored five league goals this season, as many as in the whole of last season.
- Juventus recorded their worst difference (13) between shots faced (17) and fired (4) in Serie A this season.
- Hamsik has scored 11 goals in this Serie A, one less than his record in 2009/10 (12).
- The last Hamsik Serie A goal against Juventus was back in November 2011 (10 games without scoring).