Seeded 12, Wednesday will Djokovic's 41st appearance in a Grand Slam quarter-final.
"In the last set there was a little of everything, great points, great rallies, he was hitting insane with his forehands".
When Anderson broke again in the fourth, Federer was suddenly on the ropes.
Novak Djokovic is in his first semifinals of a Grand Slam in just under two years, but is angry at just about everything. "The last couple of games I couldn't really see the ball very clearly, it was getting very dark.so I had to hang in there".
"It's been a great tournament for me, a great grass-court season - obviously I played well in Queen's", Djokovic told ESPN.
"I have been here before and I will try and enjoy this victory".
'Obviously I have a great opportunity to play the sport I love and compete at this high level and I've worked very hard and very smart to get myself in the best possible shape for these events - it doesn't get any bigger than Wimbledon so hopefully I can keep on going. "You think I ruined the court by tossing the racket two metres behind the baseline?"
Djokovic won a dozen major titles before a loss of form, and injury problems, affected his game following his first French Open triumph in 2016. But a semi-final?More news: Tropical Storm Chris Turning Into Hurricane Off North Carolina Coast
But it was the organisers' decision not to move his match to Centre Court, where the three scheduled singles matches had already finished long before Anderson and Monfils came off court, that irked Djokovic.
Defending champion Federer lost a Court One thriller, 2-6, 6-7 (5-7), 7-5, 6-4, 13-11 as 32-year-old Anderson became the first South African in the Wimbledon semifinals since Kevin Curren in 1983. Early on he was bothered by the glare off the sun, adjusting his serve and then sporting a cap.
It was on Djokovic's serve and 0-40 down, he slowed things up, taking on average 29 seconds to serve, and saved all three break points before closing out the game.
After breaking Djokovic's first serve to get off to a promising start in the fourth set, Nishikori was immediately relinquished of his lead as Djokovic broke back once and then again. This time there was nothing left in Nishikori's tank, although he leaves the All England Club having re-established himself as one of the leading contenders in Slams.
However, the 31-year-old has looked back to something approaching his best at Wimbledon. It was not a surprising result, but a pleasing one.
Indeed, he was forced both mentally and physically to go the distance against the Japanese, who has exhibited a hitherto unseen level of performance on grass this year. I don't know how you would break him and that's why it's exciting he is back in the mix.