"I had to get over it in an hour, because I played doubles", said Djokovic, cracking a smile.
Spain's Muguruza, a two-time Grand Slam champion now ranked 20th in the world, out-lasted seventh-ranked Kiki Bertens 5-7, 6-1, 6-4 while Williams, a seven-time Grand Slam victor, beat Germany's Mona Barthel 6-4, 6-4. "I need to do what I want, and what I want is to play the tournaments I want to play".
"[It's] not easy mentally to refresh your mindset and concentration and get the right intensity on the court so quickly after disappointing loss in singles".
"Things to work on, without a doubt", Djokovic said.
Serbian superstar Djokovic was playing his first tournament since lifting a record seventh title in Melbourne, taking his tally of Grand Slam victories to 15. "Tonight it worked well so I think it was a good match for me", said Federer, who like Djokovic is a five-time victor at Indian Wells.
"She was just playing so well", said Osaka.
Kohlschreiber will now face in-form Gael Monfils in the fourth round on Wednesday. "I'm really excited about that".
President Donald Trump meets Arlene Foster in Washington
Mr Trump has said he will be visiting the Republic of Ireland at some point this year. "I predicted it was going to happen". Mr Trump was due to visit the Republic of Ireland previous year , but it was cancelled for "scheduling reasons".
Former world number ones Venus Williams and Garbine Muguruza made it into the quarter-finals.
Speaking on his victory over Nole, Kohlschreiber said, "I think I put out a pretty good strategy on the court, very clever serve, good return game - it was a good day".
"One of those days" added Djokovic, whose defeat came on a day the women's draw lost it's top two seeds - world number one Naomi Osaka and number two Simona Halep.
Djokovic was just 1 for 5 on break-point opportunities.
Djokovic went on to claim a 7-6 (8-6) 2-6 10-6 victory over Jean-Julien Rojer and Horia Tecau with doubles partner Fabio Fognini, and the Serbian was left wondering why some of his shots came off against them and not Kohlschreiber. Then it was Kohlschreiber's turn to show some nerves, a sudden spate of four errors, including a double fault, giving Djokovic a break. I was able to mix up my game, cover my serve, be unsafe on the return - maybe take some rhythm away from Stan. He upset second seed Marin Cilic in the Round of 32, snapping a 12-match losing streak against Top 10 players.
Fourth-seeded Roger Federer of Switzerland will play in the third match on Stadium 1, facing 22nd-seeded Kyle Edmund of Britain.
No. 2 seed and three-time Indian Wells champion Rafael breezed by Diego Schwartzman 6-3, 6-1.
Bianca Andreescu, an 18-year-old Canadian, beat 18th-seeded Wang Qiang 7-5, 6-2.