Draper rallied from 4-6 down to win the final two sets 6-4, 7-6(5) in a sweltering affair under the lights of Tennis Paradise in California.
Both players started incredibly strong on serve, with a break finally coming in the tenth game to seal the set for Djokovic. The former world number one was in control of the second set at 4-3, but Draper reeled off three games to force a decider.
Then came the highlight of the match. The opening game of the decider was at 30-all when Djokovic won a breathtaking 26-shot rally, leaving him flat on his back. The rally earned a standing ovation from the crowd and set the tone for the rest of the match.
Djokovic earned a 0/40 lead when Draper served for the match at 5-4, eventually earning a break. But as was the theme of the evening, the 24-year-old bounced back and held his nerve in the thrilling deciding-set tie-break.
"I came out here tonight and I won that match through determination and trying to problem solve and do my best and have a great attitude," Draper said on-court afterwards.
"I'm proud of the way I regrouped. I haven't been playing on the Tour [in] a long time, so to put away guys who are top players, it's something that comes with confidence. It was a tough moment for me, but again, something I'm getting used to since coming back and I regrouped really well. That's something I can be really proud of."
Next up for Draper in the quarterfinals is Daniil Medvedev, who beat American Alex Michelsen 6-2, 6-4.
Meanwhile, top seed Carlos Alcaraz eased past 13th seed Casper Ruud 6-1 7-6(2), crushing 33 winners in the process to book a last eight date with Cameron Norrie.