After winning the first two sets, the 16th-seeded Muller held on to beat the fourth-seeded Nadal, 6-3, 6-4, 3-6, 4-6, 15-13, to reach the Wimbledon quarterfinals.
Nadal, the reigning French Open champion, has not been to the Wimbledon quarterfinals since 2011. The match lasted 4 hours, 48 minutes.
Federer, a seven-time champion at the All England Club and one of the fan favorites, reached the quarterfinals here for the 15th time in his career. He advanced to the quarterfinals for the 15th time by beating Grigor Dimitrov 6-4, 6-2, 6-4.
“I didn’t expect it go to that easy,” said Federer, the Australian Open champion. “It wasn’t as easy maybe as it looks like.”
The first man to reach the quarterfinals was Marin Cilic. The seventh-seeded Croat beat Roberto Bautista Agut 6-2, 6-2, 6-2. Cilic, who won the U.S. Open in 2014, will be playing the quarterfinals at the All England Club for the fourth straight year.
In the previous round, Querrey beat 12th-seeded Jo-Wilfried Tsonga in five sets. That match was suspended because of darkness with Querrey leading 6-5 in the fifth set, and Querrey needed only four minutes to win when it resumed a day later.
Querrey has not been past the quarterfinals, which he reached only once, in his previous 41 appearances in the main draw of a Grand Slam.
Anderson, who tied Querrey with 31 aces, reached the fourth round at the French Open in June and had twice previously reached the fourth round at Wimbledon.
The Associated Press contributed to this report.