It will be Djokovic's 41st appearance in a Grand Slam quarter-final and he will start favourite against Nishikori, who will be in his first last-eight at the All England Club.
The former world number one lost his serve in the seventh game, too, but Khachanov simply could not take advantage and Djokovic made no mistake by claiming his first set point when it arrived.
When Del Potro sent a forehand rifling down the line to take the third set, it seemed Nadal might be following Federer out of the tournament, but the World No.1 recovered superbly to triumph 7-5 6-7 (7/9) 4-6 6-4 6-4 and keep alive his hopes of an 18th Grand Slam title. "Maybe I don't have good results or good record with him, but I always enjoy playing him".
When asked what he admired about defending champion Federer, the 32-year-old Anderson was happy to reel off an exhaustive check-list.
Djokovic had four break points in the first two service games alone and suffered a Wimbledon meltdown as he bounced his racket off the ground, argued with the umpire, and then went on to lose the second set.
How to protect yourself from West Nile virus
The virus is usually prevalent from May through October when mosquitoes are most abundant. Mosquitoes become infected with West Nile virus when they feed on infected birds.
With Kevin Anderson taking nearly three and a half hours to tame French showman Gael Monfils in the previous match, Djokovic knew he had about two hours of daylight left if he wanted to avoid coming back on Tuesday's rest day to finish off the contest. He broke to 30 and then served out for a dramatic victory.
It was a case of down but definitely not out as a Rafael Nadal kept picking himself off a slippery and dusty Centre Court surface to storm into the Wimbledon semi-finals with a pulsating 7-5 6-7 (7) 4-6 6-4 6-4 over Juan Martin del Potro. President Vucic meanwhile explained that "I backed Russian Federation as that is my right". "It feels great to be in the last four", Djokovic said, via Wimbledon's Twitter account. "I guess there are other factors that play in".
Anderson added that Federer, who won his first Wimbledon title in 2003, is the ideal role model for the sport - and for those players in the chasing pack. He (Nishikori) even threw the racket in the fourth set and the umpire said he didn't see him so I get the warning, he doesn't. "It didn't harm the grass".
For the only the second time at Wimbledon, Federer was beaten after holding a two-set lead, with his previous loss from that position coming against Jo-Wilfried Tsonga in the 2011 quarterfinals.
"I thought it was unnecessary to get the warning", Djokovic said as he came off court.
"I want to use today's result as a spring from which to aim for a final place". I think that these performances here at Wimbledon have been the best I've had in the last 12 months.