At one point in the fourth set Djokovic was barely holding on after coming back from a 15-40, double-match point to make it 5-5.
But Tsonga won the next game to take a 6-5 lead in the fourth set.
Djokovic then forced a tiebreaker, winning it 8-6 to tie the match at 2-2 and force a fifth set.
The best player in the world found some extra strength at the end, completely settling down to take the fifth set in commanding fashion and eliminate a clearly gassed Tsonga.
Tsonga simply couldn't put Djokovic away, as he wasted four match point opportunities during the crazy fourth set.