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.
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.
Murdoch's 21st Century Fox ups Sky bid to beat rival Comcast
Multinational mass media corporation 21st Century Fox on Wednesday said it has raised its offer to buy United Kingdom's Sky Plc. The 21st Century Fox logo is displayed on the side of a building in midtown Manhattan in NY , U.S., February 27, 2018.
Wimbledon 2018 -- Men's quarterfinal matches
Federer ended up with more points won than Anderson in this match, but ultimately the difference came down to two unforced errors. The first hiccup surfaced at the start of the second set with Anderson breaking the Federer serve and ending that run of holds.
Former UCLA Star Billy Knight Found Dead After Goodbye Message
Unfortunately, Knight couldn't get the help he needed in time, and UCLA fans have to say goodbye to another athlete far too early. Knight was found by fire officials along a Phoenix roadway at approximately 2:45am, local police confirmed in a statement.