It looked like it would be a straightforward match for the top seed when he broke the Frenchman in the sixth game of the first set to allow him to take the opener.
Tsonga appeared to have upped his game in the second set, but once again the 2011 champion got the break and appeared to be racing to a spot in the last eight.
However, the 14th seed had a chance to get a break of his own in the third, before forcing the set to a tie-break to give him a chance to extend the match to a fourth.
The breaker remained on serve until the Serbian brought up match point, before picking out the sideline with a cross-court return to wrap up the match 6-3 6-4 7-6.
Djokovic will face Croatia's Marin Cilic in the quarter-finals.