It was Kyrgios' second win over the world's second-ranked player in two weeks. He also beat Djokovic in straight sets at Acapulco on March 2.
"That felt good to kind of prove it wasn't a one-off thing," Kyrgios said. "I competed for every point. It was hot out there. We played for two hours. It was just a good, honest win."
Djokovic was bidding for a fourth consecutive title at Indian Wells, having won a total of five in his career. But he unraveled with 25 unforced errors, including a forehand service return on Kyrgios' second match point.
"Conditions like today, where the ball travels through the air very fast and it bounces very high, it's a gamble,'' Djokovic said. "On his first serves, to try to anticipate and read his serve, where he's going to go 140 miles per hour down the T and also pretty good angle wide, it's hard to position yourself well.''
Kyrgios hit 14 aces, with his fastest serve clocking 141 mph, and won 86 percent of his first-serve points. He advances to the quarterfinals, in which he will face Roger Federer, who easily dispatched longtime rival Rafael Nadal 6-2, 6-3 in 68 minutes on Wednesday night.
Also advancing to the quarterfinals were No. 4 seed Kei Nishikori, who defeated Donald Young 6-2, 6-4; 17th-seeded Jack Sock, a 4-6, 7-6 (1), 7-5 winner over Malek Jaziri; No. 21 Pablo Carreno Busta, who beat qualifier Dusan Lajovic; and No. 27 Pablo Cuevas, who outlasted 11th-seeded David Goffin 6-3, 3-6, 6-3.
On the women's side, No. 3 Karolina Pliskova got by seventh-seeded Garbine Muguruza 7-6 (2), 7-6 (5) and next faces No. 8 Svetlana Kuznetsova, who beat 19th-seeded Anastasia Pavlyuchenkova 6-3, 6-2 to reach the semifinals.
The Associated Press contributed to this report.