Federer matched his own record of winning 34 straight sets at this year's Wimbledon, but Anderson came for him on their third round and found his own edge.
Anderson's comeback victory is only the second time Federer has lost at Wimbledon after leading by two sets, following a quarter-final defeat by Jo-Wilfried Tsonga in 2011.
Anderson will take on the victor of the quarter-final clash between former Wimbledon finalist Milos Raonic and ninth-ranked John Isner.
Anderson, a three-time All-American at IL, moves onto the semifinals of Wimbledon for the first time in his career.
"But, sure, I was also surprised it was that fast, that first set, especially 16 minutes".
Defending Wimbledon champion Roger Federer has been relegated to court one as Novak Djokovic got his wish to play on Centre Court later today.
Federer was looking fragile and when he netted on the forehand side to hand Anderson a 4-3 lead in the fourth set, the errors were becoming more problematic. "I think in hindsight that was a great decision", he recalled. "I just kept telling myself this will be my day". You have to have that mindset.More news: Rodolfo Rodriguez: Full Story of 92-Year-Old Assaulted In Texas
Roger Federer thinks a scheduling clash between the World Cup and Wimbledon is football's issue, and not something tennis should be worrying about.
What an upset. This one had a taste of an easy victory after the first two sets. "I have been building over the last couple of weeks, and the level of tennis I have played in the last couple of months felt like it was getting better and better and I feel like I am peaking at the right moment". Even when he managed to do that in the second game of the second set, Federer recovered to break back and take it to a tiebreak, which the No. 1 seed won.
It is the first time since 2015 that the eight-time champion will play away from Centre Court.
The 32-year-old Anderson won the 2006 NCAA doubles title with Ryan Rowe during his Illini career, and the native of South Africa earned All-American honors in each of his three seasons at IL. Djokovic defeated 24 seed Kei Nishikori in four sets on Wednesday at Wimbledon, 6-3, 3-6, 6-2, 6-2, to advance. The 31-year-old, however, served up the whole range from antics to awesome shot-making.
The 20-time Grand Slam champion appeared to be moving towards his fifth successive Wimbledon semi-final after taking the opening two sets.
"You are reluctant to write Roger off - just the way that he moves around the court and he stays injury free", said the Australian, who won the title in 1987.