The British third seed was tested by the big-serving South African, on a career-high ranking of 18, but ultimately triumphed 6-4, 6-3, 7-6 (8/6) in a match on Centre Court completed under the roof.
Murray mastered what 20th seed Anderson threw his way and in his four matches at the All England Club has yet to concede a set and has dropped only 32 games.
He next faces Bulgarian 11th seed Grigor Dimitrov on Wednesday for a place in the semi-finals.
"I knew I was going to get tested at some stage," Murray said.
"I was pushed, especially in the middle part of that second set, then obviously later on in the third there were some tight moments. But I handled them fairly well. It was a good match.
"When it was outdoors, I played very well and was in a good position. When we came back indoors, he started to strike the ball a bit better, he started serving better.
"It's good to get through in straight sets."
He added: "I feel good. I haven't played too many long matches. This was the longest I played.
"I've been moving well. And mentally I haven't had to use loads of energy yet. But I'm aware that's going to come. It's been a good start to the tournament."
Murray leads his next opponent, the up-and-coming Dimitrov, 3-1 in career meetings.
"All the matches are tough, everyone in the quarter-finals of the slams is playing top tennis," the 27-year-old said.
"I have to concentrate on my side of the court and if I play well, I will make it tough."
It is the seventh straight year that Murray has reached the quarter-finals and victory takes his winning streak at the All England Club to 17 matches, dating back to his gold-winning London 2012 Olympics campaign.
Murray, who became the first British man to win the Wimbledon singles in 77 years, has top seed Novak Djokovic, last year's beaten finalist, in his half of the draw as a potential semi-final opponent.
Besides his usual preparations, Anderson had warmed up for the match by enjoying a braai, a traditional South African barbecue, and by teaching himself some guitar.
But it was Murray ultimately calling the tune on Centre Court.
After the roof came on part-way through the second set, Anderson returned to the court in dogged form and took the third set to a tie-break.
The South African fashioned a set point in the breaker, but Murray dug in and sealed the match.
The match was watched by British royalty, former Manchester United football manager Alex Ferguson, Virgin tycoon Richard Branson and 1970s Grand Slam winner Ilie Nastase in his striking Romanian army uniform.