The eight-time champion and 20-time grand slam victor last played a Wimbledon match outside Centre Court in 2015.
After a slump following two years of nearly total domination of the men's game, Djokovic's star appears to be back on the rise and he is a clear contender to win a fourth Wimbledon title.
Now the 32-year-old South African moves on to a semifinal against No. 9 John Isner of the USA or No. 13 Milos Raonic of Canada.
"I'm not quite sure what to say, I had to try my best to keep fighting", Anderson told the BBC. I said today is going to be my day. You'll need to log-in to a cable provider to watch this way, but if you don't have that, you can still sign up for one of the above options and then use your Hulu or Sling TV credentials to sign in and watch on the ESPN digital platforms. He was made to work hard in his Round of 16 tie by Ernests Gulbis who had stunned world number three Alexander Zverev earlier this week. "Matches likes that are very special".
In the 23rd game of the fifth set, Anderson finally broke Federer after the two held serve for nearly the entire set.
That initial burst gave Federer 34 successive sets won at Wimbledon, equalling his own record set between 2005 and 2006.
The 12-time major victor defeated Kei Nishikori 6-3, 3-6, 6-2, 6-2 on Centre Court to set up a clash on Friday with either world No 1 Rafael Nadal or Juan Martin del Potro.
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.
Deploying his huge serve to lethal effect, Anderson roared back to leave the champion's title bid in tatters thanks to a barrage of 28 aces and 65 winners.
Defending Wimbledon title holder Roger Federer was knocked out of this year's championships by South African Kevin Anderson in the quarter-finals on Wednesday.
Three-time champion Djokovic, who hasn't won a Grand Slam since French Open in 2016, seems to have hit peak form at the right time.
Roger Federer sweeps into the last-eightRafael Nadal returns the ball to Jiri Vesely during the Wimbledon men's singles match.
Federer had been pursuing a 13th Wimbledon semi-final and a 44th appearance in the last four of a grand slam.
Update: Federer not only dropped his first set, but his second as well.
But Anderson was just getting started.
Federer was completely out of sorts by now and his uncharacteristic struggles on his forehand didn't improve in the fourth set.
Federer wasted a match point during the 2-6, 6-7 (5), 7-5, 6-4, 13-11, match.
While tennis purists salivate at the prospect of another dream final showdown between Roger Federer and Rafael Nadal, the two living legends' greatest rival is threatening to tear up the script.
Cardi B files $15m Countersuit against Former Manager
The plaintiff attorneys did not immediately respond to a Law&Crime request for comment about the counterclaim Thursday afternoon. The rapper filed the suit at a federal court on Thursday, saying that he was overly controlling of her personal life and career.