Federer had won his last seven five-set matches.
The World Cup showpiece will take place on Sunday at 18:00 (local time), which is 16:00 BST, meaning it is likely to kick off during the men's grass-court final, which eight-time champion Federer is a heavy favourite to be a part of.
"I think the first warning was unnecessary", said Djokovic, who was sanctioned in the second set for spearing his racquet into the court.
Novak Djokovic's clash with Kei Nishikori and Rafael Nadal's duel with Juan Martin del Potro share the Centre Court limelight. Others still in the running for this year's men's singles title include Spanish star Rafael Nadal and Argentina's Juan Martin Del Potro, now duking it out in their own quarterfinal.
Wednesday's other quarter-final sees 2016 runner-up Milos Raonic tackle USA ninth seed John Isner, making his Wimbledon last-eight debut at 33. Isner responded with an ace on that occasion and then went on to take the fourth set. Beating Roger Federer will be one to remember, certainly in such a close match.
Not quite to the same extent as Anderson, but Djokovic too was forced to improve as his meeting with Nishikori raged on, particularly after the 24th seed showed a sturdier response to level after two sets. "I'm a big player, big serve. 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.
Federer's quest for a ninth title at The All England Club came to a dramatic end with just his fifth defeat from two sets up in an unparalleled 20-year, 1415-match career.
"I just kept telling myself to keep believing and that today it would be my day, that's the mindset you need against someone like Roger".
Trump administration slashes more ObamaCare funds
President Donald Trump departs after speaking at a Make America Great Again rally in Great Falls, Montana, U.S., July 5, 2018. In other words, the Trump Administration position in court is in favor of making the payments .
Operation resumes to free remaining 5 from Thai cave
Thailand's navy SEALs say the four boys and coach rescued on Tuesday, after other rescues in the previous two days, are all safe. Mr Narongsak said he was grateful for Mr Musk's support but the equipment was impractical for the rescue mission.
Former Illini star Kevin Anderson ousts Roger Federer at Wimbledon
It will be the 31-year-old's first semifinal at a Major since the 2016 French Open when he completed the career Grand Slam. It looked like it would be five when Federer had a match point in the third set, while leading by two sets to none.
But after failing to convert a match point in the third set, Federer allowed a rash of errors to creep into his game, particularly on the forehand side.
Nadal faces the victor of Juan Martin del Potro and Gilles Simon while Federer takes on US Open finalist Kevin Anderson in the quarterfinals.
The eighth-seeded Anderson trailed two sets to none and faced match point in the third set before staving off elimination to win the set 7-5.
While the match was a one-sided affair, there was one moment during the first set that really impressed fan on the stands.
Djokovic also advanced to his first Grand Slam semifinal since 2016, shrugging off a second-set slump to beat Kei Nishikori 6-3, 3-6, 6-2, 6-2.
"It was quite a odd feeling for me not to be able to deliver my game that I know I possess, that I know I've been delivering for so many years", Djokovic said ahead of Wednesday's quarter-finals.
Del Potro is in his first quarter-final at the tournament since 2013 when he reached the semi-final. "When I come here, I come here thinking I can do a good result". "I'm pleased I'll be staying there right now".