World number one Djokovic was reduced to tears after the loss as he had made it a priority to win an Olympic gold medal, the only major prize that has eluded him in a glittering career.
“No doubt this is one of the toughest losses in my life and in my career,” a distraught Djokovic said. “It's not easy to handle, especially now, just after the wounds are still fresh.”
After winning this year's Australian and French Open titles, Djokovic was the favourite to add Olympic gold to his 12 grand slam titles and Del Potro was as surprised as anyone to see the Serb go out.
“I didn't expect to beat Novak," said the 2009 US Open champion, who has been battling a wrist injury for much of the season and is ranked 141st in the world.
“But I played an amazing match, my forehand worked great.”
The 27-year-old Argentine crunched 29 forehand winners in comparison to just seven by Djokovic, who lost a bronze medal match to Del Potro at the London Olympics four years ago.
Del Potro, who was once ranked fourth highest in the world, said the performance against Djokovic gave him hope of fully overcoming his injury nightmare.
"I felt once again I had the capability to play against the best in the world," he said.
The two men, who are also friends, were both visibly emotional and shared a warm embrace over the net at the end of the game in which a raucous Brazilian crowd produced an electric atmosphere.
"This kind of atmosphere I experience a few times in my life, mostly when I'm in my country. This felt like I was in my country. This felt like I was Brazilian,” said Djokovic.
The Serb will get another chance to experience the Rio atmosphere when he teams up with Nenad Zimonjic to play Brazilian duo Marcelo Melo and Bruno Soares in a second round men’s doubles match on Monday.
Also in the men's singles draw, Andy Murray began by losing serve but quickly broke Serbia’s Viktor Troicki on his way to a 6-3, 6-2 win. Spain’s Rafael Nadal, the No.3 seed, also lost his serve in the first minutes of the match but ended up with a comfortable win, beating Federico Delbonis of Argentina 6-2, 6-1.
Women’s singles top seed Serena Williams had a successful start to her quest for a second consecutive singles gold by defeating Australia’s Daria Gavrilova 6-4, 6-2. On Monday night, Williams will face France’s Alize Cornet, who is on a three-game winning streak against her.
In the doubles, however, Serena and her sister Venus Williams lost for the first time as a team in the Olympic Games. The American No.1 seeds were eliminated by Czech pair Lucie Safarova and Barbora Strycova 6-3, 6-4.