Bumped to Court 1 for the first time this tournament, Federer suffered away from the home comforts of Centre and missed a match point in the third set. After that, Federer began to struggle and Anderson unloaded his swings on every shot.
Federer, the eight-time champion, took the first two sets 6-2, 7-6 (5) on Court No. 1 to extend his streak of winning 34 straight sets at the All-England Club.
Djokovic secured that game with a forehand victor, then saved two game points on Nishikori's serve before converting his first match point with a forehand down the line.
"He claims that he didn't see what Nishikori has done, but apparently he always sees what I do", Djokovic said afterward, "something that I don't think is fair".
And his great rival Federer, despite the fact he will be 37 when the next Wimbledon comes around, allayed any fears that he might hang up his racket sooner rather than later.
"It would take an unbelievable serving performance and for Roger had a bad serving day to cause an upset".
In the hunt for a record-extending 9th Wimbledon title, Roger Federer has bowed out at the quarter-final stage this evening.
There was little sign of the drama which unfolded when Federer raced through the first set in 26 minutes.
Cardi B and Offset welcome a new baby for the culture
The musician and her partner Offset , part of hip-hop group Migos , welcomed a daughter called Kulture Kiari Cephus. This is the first child for the couple who secretly married in September 2017.
Anderson never had made it beyond the fourth round at Wimbledon until this week, carried by his booming serve. It's the second-farthest he's advanced in a Grand Slam tournament, having made the final of the US Open in 2017.
Eighth seed Anderson will play 2016 runner-up Milos Raonic or American ninth seed John Isner on Friday for a place in Sunday's final.
How rare was it that Federer would lose after holding a match point in a major?
"Luckily for me it didn't happen", Djokovic said after he romped to a 6-4 6-2 6-2 win to reach the last eight for a 10th time. When Nishikori let his own racket fly in the fourth set, he wasn't chastised, which prompted Djokovic to yell "double standards" toward Ramos - drawing boos from fans.
After racing through the first set, Djokovic was handed his first code violation for unsportsmanlike conduct after bouncing his racquet into the grass in frustration at squandering three break points in the third game of the second set.
Djokovic, 31, will be playing in his 32nd Slam semi-final where he will face either world number one Rafael Nadal or fifth-seeded Juan Martin del Potro. I had moments where I was great, I felt like I was reading his serve, other moments where I don't know where the hell I was moving to.
"To be honest, I thought it was unnecessary to get a warning. I hope I can get a chance to fight for a trophy".