In a match interrupted Saturday by three rain delays after being suspended in progress because of showers a night earlier, the hard-serving Querrey ousted Djokovic 7-6 (6), 6-1, 3-6, 7-6 (5) in a third-round match at the All England Club.
"Congratulation to Sam. He played a terrific match," said Djokovic, who had won the past four major titles and was bidding to become the first man since Rod Laver in 1969 to win them all in the same year. "He serves very well, as he usually does. I think that part of his game was brutal today. He made a lot of free points with the first serve. Just well done. He just overpowered me."
Djokovic had won 30 consecutive Grand Slam matches, the longest such run by a man in nearly a half-century. He didn't just appear to be unbeatable at the majors. He was.
No longer. His magical streaks are gone, including two successive titles at the All England Club and 28 Grand Slam quarterfinal appearances in a row, all brought to a sudden, stunning end by a player who has never participated in a major quarterfinal. With 31 aces against as good a returner as there is, Querrey did what no one else could for so long.
"He just overpowered me," said Djokovic, who added that he wasn't 100 percent healthy but wouldn't say what was wrong. He said he will not play in the Davis Cup quarterfinals against Britain this month.
"I believe in positive things in life, and I managed to win four Grand Slams in a row -- two different seasons, though," he said. "I want to try to focus on that rather than failure."
Play ended for the day at Wimbledon with four men's third-round matches suspended in progress Saturday night.
That includes No. 7 Richard Gasquet leading Albert Ramos-Vinolas, No. 18 John Isner leading No. 12 Jo-Wilfried Tsonga, and No. 32 Lucas Pouille leading 2009 U.S. Open champion Juan Martin del Potro, all by two sets to one.
Things began looking bleak for Djokovic, the world No. 1, when the match began Friday and he dropped the first two sets against Querrey, an American ranked 41st. After play was halted by rain, a recurring theme in this contest and the tournament as a whole, Djokovic came back out Saturday and played much better.
He took the third set, then went up a break in the fourth at 5-4 by pounding a forehand winner that brought coach Boris Becker to his feet. But serving to even the match at two sets apiece, Djokovic faltered.
That game included two calls against Djokovic that, according to the BBC broadcast, were incorrect, but he was out of challenges and couldn't ask for a review. Querrey, 0-for-6 on break points in the set until then, converted No. 7 when Djokovic's poor forehand volley found the net for 5-all.
In the closing tiebreaker, Djokovic led 3-1, but Querrey hung in there, and a stray forehand by the big favorite sailed wide to end it.
"Probably not the best he's ever played," said Querrey, who plays France's Nicolas Mahut next, "but not the worst he's ever played."
Said Djokovic: "I had my chances maybe in the fourth set, serving for the set. In the tiebreak, I was leading. Just wasn't feeling the ball as well as I wished. But that's sport."
It's the first loss for Djokovic at any major tournament in more than a year: He was beaten by Stan Wawrinka in the French Open final in June 2015. Since then, Djokovic won his third trophy at Wimbledon last July, his second at the US Open in September, his sixth at the Australian Open in January, and his first at the French Open less than a month ago.
"As I said, you know, in sports everything is possible," Djokovic said. "If you're playing somebody of as a high quality as Sam Querrey is on this surface with a big serve, anything can happen. I was a few points away from losing last year against Kevin Anderson in a very similar match on the same court. Sometimes it works in your favor, sometimes against. You got to deal with that."
Laver remarked Saturday that he felt Djokovic might very well be the player who would end his distinction as the last man to win a calendar-year Grand Slam. But as he watched the match against Querrey, Laver said, he was struck by Djokovic's lower-than-usual level of play.
"That was sort of quite a surprise, seeing Novak getting knocked out. I thought he was going to get the title," Laver said in a telephone interview. "I don't know whether it was the pressure or whether he wasn't feeling up to full power. ... It didn't look like he was ready to play a big match."
Querrey, who became the first American to beat Djokovic at a Grand Slam event since Andy Roddick (2009), finished the match with 31 aces. Querrey improved to 21-1 in his career when he wins the first two sets.
"I'm really excited. It's an unbelievable win," Querrey said in a postmatch interview before heading off to play doubles. "To do it here at Wimbledon is really special. ... I served well the whole time, played a great tiebreaker at the end to get the win."
He has never made it past the fourth round at any major. The last time an American man beat the No. 1 seed at a Grand Slam event, Andre Agassi ousted Lleyton Hewitt in the semifinals of the 2002 US Open.
Querrey will be joined in the fourth round by countryman Steve Johnson, who beat Grigor Dimitrov 6-7 (6), 7-6 (3), 6-4, 6-2 to reach the round of 16 for the first time in 17 Grand Slam appearances. Johnson will play Roger Federer next.
Nishikori, who made only 14 unforced errors, will next face Marin Cilic, who beat the Japanese star in the 2014 U.S. Open final.
Since then, Nishikori has won both of his matches with Cilic, both last year on outdoor hard courts. Their fourth-round match will be their first on grass.
Action will resume Sunday. Rain has been a real problem at Wimbledon this week, and organizers have decided to play on the middle Sunday for only the fourth time in the tournament's 139-year history.
The Associated Press contributed to this report.