Kevin did his best to prevail in the crucial points after that second set tie break, creating seven chances and stealing Roger's serve four times, including that crucial one at 11-11 in the decider.
The next challenge for Djokovic is a quarter-final against Kei Nishikori, who he has beaten 12 times in a row since the Japanese star claimed his biggest victory in the semi-finals of the US Open in 2014.
World number one Nadal faces a tricky test against power-hitter del Potro in his first Wimbledon quarter-final since 2011.
11-time French Open victor Rafael Nadal beat Juan Martin del Potro comfortably in straight sets at Roland Garros just over a month ago.
Anderson will play 2016 runner-up Milos Raonic of Canada or American ninth seed John Isner tomorrow for a place in Sunday's final.
That didn't seem to affect his focus, though, and neither did a time violation he was given when serving at 4-2, 30-30 in the fourth set. Anderson upset top seed Roger Federer of Switzerland on Wednesday.
"But, sure, I was also surprised it was that fast, that first set, especially 16 minutes". "I've been building the last couple of weeks on the level of tennis that I've played the last couple of months, the last couple of clay-court tournaments and Queen's".
Serena survives scare to make 11th Wimbledon semi-final
Later, Serena Williams resumed her quest for an eighth Wimbledon title when she played 52nd-ranked Camila Giorgi of Italy. The Slovak player downing Hsieh Su-Wei in straight sets, 6-4 6-1, to reach the quarter-finals for a third time.
This will be their first meeting on grass, and Nishikori said: 'I think it's going to be a new game for us. More than two hours after that match point, Federer and Anderson battled and battled. "The more I can just treat it like another tennis match, the better for me".
Federer fell to 266-3 in career Grand Slam matches where he won the first two sets.
They remained on serve early in the fifth set, as the match passed the three-hour mark.
Either way, Dancer is eager to see how Anderson fares in his latest shot against Federer.
Federer had a match point at 5-4 in the third set, but struck a backhand into the net before the eighth-seeded Anderson broke in the following game and held serve. Following a convincing, and more importantly quick given the fading light, straight-sets win against Karen Khachanov, Djokovic is the clear favourite here and looks someway to regaining the sort of form which saw him win 12 Grand Slam titles. Nothing could separate the rivals in the fifth set and it was Anderson who finally clinched a break in game 23 (he saved a break point at 4-3 as well), sealing the deal to enter the last four. In the end I did a great job, I wasn't thinking too much.
Anderson, 32, is the first South African man to make the last four at Wimbledon since Kevin Curren in 1985.
Isner is hoping he might have some presidential support should he reach the semi-finals, with Donald Trump due to visit the United Kingdom later this week.
"Of course this is an important result for me", Nadal said after the match.