"I can look at this quarterfinal in a totally relaxed fashion".
Querrey bounced back in the fifth set, breaking Anderson to lead 4-2 and seeing another match point at 5-2.
Awaiting the 14th seed is Russia's Svetlana Kuznetsova, who defeated Poland's Agnieszka Radwańska 6-2, 6-4.
It had been ten years since she first met Radwanska on the WTA Tour, also at Wimbledon in 2007. Nadal lost 3-6, 4-6, 6-3, 6-4, 13-15 in the match that lasted almost five hours.
In the women's singles event, Spain's Garbine Muguruza beat top seed Angelique Kerber of Germany 4-6, 6-4, 6-4 to reach the quarter-finals.
Still the players battled on until 28th game of a gruelling, but absorbing contest when Muller eked out a fifth match point.
"Rafa stepped it up in the third and the fourth set", Muller told reporters.
Rafael Nadal kept getting pushed to the brink of defeat. The new mother will still have a lot of work to do rankings-wise before the US Open next month. I tried to take a big return on his second serve at one match point.
But the two-time Wimbledon champion admitted he had not played the big points well, especially against the Luxembourger's serve, whose 30 aces took his tournament-leading total to 102.
The second Monday of Wimbledon is one of the best days of the tournament. It is a great feeling.
Former Wimbledon champion John McEnroe questioned the decision.
Murray, who has two Wimbledon titles, is 7-2 in his previous nine quarterfinal matches.
Defending champion Sir Andy Murray is also through to the last eight after defeating France's Benoit Paire 7-6, 6-4, 6-4.
The Spaniard hadn't lost a set at a Major since his loss to Roger Federer in the Australian Open final in January but dropped the opening two sets to find himself two sets to love down.
Nadal made a mess of an attempted dropshot to give Muller a break at 4-4 in the second set and the man from Luxembourg moved two sets ahead when Nadal netted a backhand.
"I had some important break points, these kind of break points are nearly match points", Nadal added. He is having the best year of his career despite his advanced tennis years, capturing a first title in Sydney in January and claiming a grass-court title in the Netherlands two weeks ago.
The epic finished just after 8.30pm local time and Muller admitted he thought he'd need to come back on Tuesday to complete it when Nadal fought back from two sets down and staved off four match points in the tension-filled fifth.
The 34-year-old triumphed 6-3 6-4 3-6 4-6 15-13 in nearly five hours to reach a first quarter-final at SW19. By the time Wimbledon is done, he will up to 22 and, with another win, could break the top 20 for the first time. The gruelling final set alone lasted 2 hours and 15 minutes and it proved out to be one hell of a ride. It's tough to say exactly what made the difference.