The 31-year-old had won eight of his nine meetings with Kohlschreiber but the 35-year-old German outfoxed him during a last 32 match which started during the Monday night session but was postponed until Tuesday due to rain.
"I liked my chances more at night," Djokovic said. "Completely different conditions in the day: ball bounces much higher.
"Obviously he uses his spin very well. I wasn't playing well. One of those days.
"I congratulate him for playing tactically really well and getting me out of my comfort zone," Djokovic said. "He deserved to win."
The victory was Kohlschreiber's first against a world number one in 11 attempts.
"It's a very special moment," he said. "Of course, playing the top guys is always a big pleasure, but most of the time they beat you."
After claiming the first set, Kohlschreiber broke Djokovic at the start of the second set. He claimed Djokovic's serve again to lead 5-2 lead.
But he fluffed his chance to serve out and allowed the top seed to come back within range.
Kohlschreiber, however, held his nerve on the second time of asking to set up a last 16 meeting with the 18th seed Gael Monfils who has won 13 of their 15 encounters.