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.
"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," Murray said.
"It's a good win because he was playing well at the end and making it very tough for me. It's good to get through in straight sets."
Murray leads Dimitrov 3-1 and Mayer 2-0 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 for them."
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.
Though Murray converted just four of 19 break points, and was tested at times throughout, he always had too much for Anderson.
The South African rained down serves at up to 134 miles (216 kilometres) per hour but Murray coped with the onslaught.
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 at 6-5 up in the tie-break, but Murray ultimately dug in and sealed the match.
The last South African to reach the Wimbledon fourth round was Wayne Ferreira in 2000.
The match was watched by British royalty, Virgin tycoon Richard Branson, evergreen pop singer Cliff Richard and 1970s two-time Wimbledon finalist Ilie Nastase in his striking Romanian army uniform.