Serving at deuce and 3-4, Anderson yanked Federer from one corner of the court to the other with blistering groundstrokes until the Swiss ended the 21-shot rally by netting yet another backhand.
Anderson staved off Federer's first and only attempt at match point, trailing 5-4 in the third set, before winning the game to tie the set at 5-5 and ultimately winning the next game to take a 6-5 lead.
Anderson hit 13 winners and just four unforced errors in the fourth set as he claimed the only break to force a decider. Still the focus was on the big three in the men's draw - Federer, Novak Djokovic and Rafa Nadal - but Anderson believed he could surprise many with victory, constantly talking to himself throughout the game. Federer held on the match and set point.
Nishikori, who had won only two matches in 15 meetings with the 12-time major victor, broke for 1-0 in the fourth but was broken straight back. "It just happened to be that today wasn't the day".
Federer took the first two sets and then the South African returned strongly to take the third and fourth sets. It set Federer off - he remained heated by the overturn ("That one cost me the match, eventually", Federer said later) and he began jawing at the chair umpire to complain about a number of things, including how long Del Potro was taking to challenge.
Federer, whose form here made it look increasingly likely he would become the first man in the professional era to win five Grand Slam titles after the age of 30, said fatigue had not been a factor even when the match went into its fifth hour.
Anderson's next opponent will come Friday against No. 9 seed John Isner, who made his first ever semifinal with a win over Milos Raonic.
His loss to Anderson was the first match he'd played on Number One Court since 2015.
Now the 32-year-old South African moves on to face number nine John Isner of the United States on Friday.
Couple on honeymoon collide in fatal zip line accident
Honduran authorities are investigating the incident while the zip line company has promised to assist them with their enquiries. A honeymooning couple have had their holiday end in tragedy after a zip lining adventure in Honduras turned fatal.
Nadal reached the quarterfinals of Wimbledon for the first time since 2011 after defeating Jiri Vesely in a 6-3, 6-3, 7-5 victory on Monday.
Soon enough, Djokovic was on his way to the semi-finals, where he will meet Rafael Nadal.
There's nothing really that shocked me because I've seen Kevin play many, many times in the past.
"Sometimes you don't feel good, and you try your best". I couldn't really get the rallies going the way I wanted to, especially 1-2 punch wasn't working at all.
He had been yearning for a Centre Court date, after playing as many games on Court Two as the main show court so far this tournament.
Likely Impact of US-China Trade War: Prices Up, Growth Down
In June, the British leader warned both Trump and European Union leaders of the dangers of entering a tit-for-tat trade war. On Thursday, Commerce Ministry spokesman Gao Feng hit back at "threats and blackmail" ahead of the planned USA tariff hike.
It is timed for release as the anticipation crests with Roger as returning champion, 10 years after their famed 2008 Wimbledon championship - an epic match so close and so reflective of their competitive balance that, in the end, the true victor was the sport itself.
England aim to join France in World Cup final
It will be the third match his has officiated at the World Cup after overseeing Morocco vs Iran and Nigeria vs Argentina. After falling short for generations, coach Gareth Southgate has put together a team that is playing like a team.
William’s call to England: It’s coming home!
That match against West Germany had ended in a 1-1 draw, with England going on to lose the penalty shootout. He said: "Thanks to you lovely people, Shotgun has been Number 1 for two weeks running.
U.S. to impose tariffs on $200 billion Chinese imports
High-level talks between the two countries starting in May failed to deliver a breakthrough to head off a trade war. Regulators can deny or cancel licenses or launch lengthy tax, environmental or anti-monopoly investigations.