The big-serving American came through 3-6 6-4 (4)6-7 6-1 6-1 to pick up the biggest victory of his career, sealing his place in the semi-finals at SW19 in the process.
It all started well for Murray as fears that he would struggle against Querrey's serve initially proved unfounded, breaking at the first available opportunity and going on to serve out the opening set in less than half an hour.
The world number one looked to be in control once again when he broke Querrey in the seventh game of the second set too, but this time the American hit straight back with two breaks of his own, winning the final three games to level things up at one set apiece.
Murray was again the first to break in the third set, doing so in the very first game, but Querrey was matching the Scot every step of the way and saved himself with a break of his own while Murray was serving for the set.
That forced a tie-break, although Querrey made a number of unforced errors to quickly fall 6-1 behind before Murray wrapped up the third with his fourth set point.
The two-time Wimbledon champion then began the fourth set with a love game, but it was downhill from that point on and Querrey strung together three consecutive breaks to win the next six games and claim the set in just 23 minutes.
The world number 28 extended that run of consecutive games to nine with another early break in the decider and, while Murray finally got on the board in the fourth game of the set, it proved to be a minor show of defiance and it again took Querrey less than half an hour to win the fifth and clinch the match in the process.