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.
Murray won the first and third sets on Centre Court, but Querrey won the other two to even the score at 6-3, 4-6, 7-6 (4), 1-6.
Murray said: "The whole tournament I've been a little bit sore". "I tried my best right to the end".
He will be wary of Querrey, who ended Djokovic's title defence 12 months ago, and said: "Sam obviously likes the conditions here. I'm going to enjoy this one a little longer, have an easy day tomorrow and do the best I can to get ready for the semis".
For the second straight year, Sam Querrey has knocked off the defending champion and top seed at Wimbledon. Cilic is 4-0 against Querrey, including Wimbledon matchups in 2009 and 2012. Querrey will meet Marin Cilic in a semifinal on Friday.
"What was very tough was the beginning of the fifth set", said Muller after Cilic advanced to his first Wimbledon semifinal.
The third set was arguably harder than it needed to be as well, with Murray missing a chance to serve for the set at 5-4 before taking it in a tie-break.
This time around, Querrey's upset pust him through to the semifinals, after already defeating No. 12-seeded Jo-Wilfried Tsonga and Kevin Anderson to reach his second major quarterfinal.
The defending champion faded in his match against the fresher looking American tennis player.
Murray was a shock fourth-round loser at the Australian Open before an encouraging run to the last-four at Roland Garros. Roger Federer, the co-favourite to lift the trophy on Sunday, will face last year's finalist Milos Raonic in the other quarter-final on Tuesday. But in his post-match press conference, where people expected an explanation for the unlikely defeat, things took a turn when Murray corrected a reporter's question.