The Serbian was beaten by Alexander Zverev in the singles semifinals and also lost in the last four of the mixed doubles.
A shot Novak Djokovic said his game fell apart after watching his dreams of an Olympic gold medal and a Golden Slam go up in smoke in Tokyo.
The world number one was looking to become the first man in history to win all four Grand Slam titles and Olympic singles gold in the same year, but Alexander Zverev fought back brilliantly after losing the first set to win 1-6 6-3 6-1.
This is the third time Djokovic has lost in the semifinals at the Olympics, his only medal to date being a bronze medal in Beijing in 2008.
The 34-year-old still had a shot at winning mixed doubles gold with Nina Stojanovic, but a miserable day was over when they were beaten 7-6 (4) 7-5 by the Russian Olympic Committee duo. Aslan Karatsev and Elena Vesnina.
“I feel bad,” said Djokovic, who declined to blame the incredibly wet conditions.
“It’s just sports. He played better. You have to give him credit for turning the game around. He served extremely well. I wasn’t getting too many looks on the second serve.
“My serve just dropped drastically. I didn’t get any free points to 3-2 in the second. My game fell apart.”
Djokovic must try to wake up for two strokes to a bronze medal on Saturday. He will face Spain’s Pablo Carreno Busta in singles before he and Stojanovic face Ashleigh Barty and Australia’s John Peers.
Djokovic declined to comment on the condition of his body, saying he was hoping to wake up for another big effort: “Let’s see. I’m feeling bad right now. medal for my country. “
Zverev will face Karen Khachanov of the Russian Olympic Committee for the gold medal, and he was in tears on the pitch afterward.
The two shared a warm embrace at the net and Zverev said: “I told him he is the greatest of all time, and he will be.
“I know he was continuing the story, chasing the Golden Slam and chasing the Olympics, but in times like these, Novak and I are very close.
“I’m sorry about Novak, but he’s won 20 Grand Slam tournaments, 550 Masters series or whatever, you can’t have it all.
“It is an incredible feeling to know that you are going to take the medal home, home for Germany. It seemed like it was impossible to beat him at this event, so I’m very happy right now. But there is still one game to play. “
Djokovic had qualified for the last eight, losing just two games to Kei Nishikori in the quarter-finals, but Zverev also played well and it always looked like the biggest obstacle.
Djokovic’s other big opponent was humidity, with which he never handled well. He persuaded the organizers to postpone the start of the game from 11 a.m. to 3 p.m. to avoid the worst of the heat, but conditions were still extremely difficult despite the game starting around 5 p.m.
The Serbian, who was on a 23-game winning streak with the Roland Garros and Wimbledon titles, looked set for another easy win as he made it through the first set and beat Zverev 3-2 in the second.
But from there the game changed, the mighty German starting to realize the impossible to beat his opponent as he won a remarkable eight straight games.
Djokovic, who may yet become the first man in more than half a century to win the Grand Slam calendar by lifting the US Open trophy, ultimately stopped the rot to hold 1-4 in the deciding game, but a lackluster final match showed he knew the the match was over.
Khachanov continued his good form earlier after reaching the quarter-finals at Wimbledon with a 6-3 6-3 victory over Carreno Busta.
The first gold in tennis went to Wimbledon champions Nikola Mektic and Mate Pavic in men’s doubles after beating compatriots Marin Cilic and Ivan Dodig, both results being Croatia’s best in Olympic tennis.
Marcus Daniell and Michael Venus won the first tennis medal for players representing New Zealand while, in the mixed final, Karatsev and Vesnina will face ROC teammates Andrey Rublev and Anastasia Pavlyuchenkova.