He saved a match point on his way to a grinding five-set win over Bosnian Damir Dzumhur 6-2 3-6 4-6 7-6 (3) 7-5.
The 12-time grand slam victor will instead meet another Spaniard, Fernando Verdasco, in the last 16.
The two players shared six breaks of serve during a back-and-forth third before Djokovic took a tie-break 7-4, but it was one-way traffic during the fourth.
The 31-year-old Serb is still wrestling with his own game as much as the man across the net, but there was plenty of evidence in his 6-4 6-7 (6) 7-6 (4) 6-2 victory on Saturday (NZ time) to suggest he is approaching the form that earned him 12 grand slam titles.
Verdasco's hopes of reaching his first French Open quarter-final were sunk when Djokovic nailed down a break at the start of the third set before cruising to victory.
"Trust me, in that moment when I do it, I don't think how it can help me", Djokovic said of his tantrum.
At the time Zverev was beginning a comeback to prevent the extension of his ignominious streak at Grand Slams, which has yet to see him advance beyond the last 16.
But the Russian sealed the set at the third time of asking, leaving the World No. 3 needing a fightback for the third consecutive match.
Djokovic claimed a close opening set, clinching the first break in the match in the 10th game to move ahead.
In the Open championship of France on tennis in the men's singles decided the first participants of the 1/8 finals.
Shedding his mood lately in matches has been a very good signal for some onlookers - a sign that the starvation is again.
The draw has fallen in his favor with Verdasco having removed fourth seed Grigor Dimitrov and he had another slice of fortune on Sunday when eighth seed David Goffin was beaten by unheralded Italian Marco Cecchinato.
Wozniacki and 14th seed Kasatkina will return to Court Philippe Chatrier on Monday with the Russian leading 7-6 (7/5), 3-3, after their match was halted when darkness fell.
"First week, my goal is to get to the second week", said 23-year-old Keys.
Djokovic, ranked as low as 20, is eying to match Roger Federer's Open Era record of nine successive quarter-final appearances in Roland Garros as he takes on in-form Verdasco later today.