“It’s a very special moment,” Kohlschreiber said. “Of course, playing the top guys is always a big pleasure, but most of the time they beat you.
“Today, with Novak being number one, top-seeded here, it’s a very incredible win for me.”
In match that resumed after rain stopped play just one game in on Monday night, Kohlschreiber said the warmer daytime conditions suited him better.
He came out with a crisp, confident style, breaking Djokovic in the seventh game and closing out the opening set with a service winner.
Djokovic displayed his frustration by banging his racquet against his foot until it crumpled, but it did nothing to improve his fortunes as Kohlschreiber opened the second set with a break.
Two wayward forehands and a double fault from Djokovic helped Kohlschreiber to another break for a 5-2 lead.
Then it was Kohlschreiber’s turn to show some nerves as a string of four errors, including a double fault gave Djokovic a break back.
He made no mistake on his second chance, however, firing a sideline-skimming forehand to seal the milestone win on his first match point.
Kohlschreiber, who arrived at Indian Wells on a three-match losing streak, will face France’s Gael Monfils for a place in the quarter-finals.
Djokovic will try to regroup after the abrupt end to his bid to win a record sixth Indian Wells title and match Rafael Nadal’s record of 33 Masters 1000 titles.
World number two Nadal stayed on track to improve that number as he swept past Argentine Diego Schwartzman 6-3, 6-1 to reach the last 16.
Nadal took his record against the world No. 26 to 7-0 in emphatic style, never facing a break point in a match lasting an hour and 16 minutes.
“I think I played a very solid match. I did a lot of things well,” said Nadal, adding that despite his lopsided record over Schwartzman he considered the Argentine a formidable opponent, citing tough matches against him at the Australian Open and Roland Garros.
“I suffered in the past against Diego,” he said. “So it’s a positive victory for me.”
Nadal, a three-time winner of the Indian Wells title, next faces Serbian qualifier Filip Krajinovic, who ousted 14th-seeded Russian Daniil Medvedev 6-3, 6-2.