Murray's stellar year showed no sign of stopping as he successfully defended his title, defeating Argentina's Juan Martin del Potro 7-5 4-6 6-2 7-5.
Britain's world No. 2, who beat Roger Federer for gold at London 2012, emerged victorious from an almighty four-hour struggle against a man whose run to the final has made him one of the most popular athletes of these Games.
"I know tonight's one of the hardest matches that I've had to play for a big, big title," Murray told reporters.
"I think the US Open final I played against Novak (Djokovic) when I won my first slam was very hard. But tonight I found really difficult.
"Emotionally it was tough. Physically, it was hard. There were so many ups and downs in the match.
"It was one of the toughest matches that I've played to win a big event, for sure."
Few gave 141st-ranked del Potro a chance of even getting past the first round after being paired with top seed Novak Djokovic.
But the Argentine not only eliminated Serbia's world No.1 but also accounted for 2008 Beijing gold medalist Rafael Nadal in the semifinals too.
He won bronze four years ago but a succession of wrist injuries have hampered what had promised to be an even more successful career.
"After this week, the way things happened with the people, the emotions I felt -- in my career so far I've never lived something as beautiful as this," del Potro told reporters.
"Any athlete will give his best to be here and having this (Olympic medal) around my neck is a dream for any sportsman. To have the chance to have two is much more than a dream."
"Tennis is my life. I suffered when I wasn't able to play and today tennis is making me very happy again.
"I've been through some wonderful things here, on the court, at the Olympic village, talking to the people from Argentina.
"All of this happens because I'm playing tennis. For me, to talk about tennis, to play it, to be able to show my level of game, to be able to grunt when I hit my forehand, all these things I missed."
Times have been tough for del Potro.
Since winning the US Open in 2009, the same year he also reached the last four at Wimbledon and Roland Garros, he has struggled in the grand slams.
A semifinal appearance at Wimbledon in 2013 remains his best recent run, while his last ATP tournament title came at Sydney in 2014.
Del Potro's renaissance has been one of the stories of the tournament, but Murray was widely expected to end the fairytale run.
The Scot took the first set after 74 minutes -- a microcosm of the lengthy contest to come.
The second set went the way of the 6-foot 6-inch del Potro, whose powerful forehand caused Murray continuous problems.
But back came Murray, taking the third as del Potro appeared to tire.
The fourth set was a far closer affair, with both men struggling to hold serve.
Del Potro served to level the match at 5-4 but was undone by some wonderful work by Murray, who forced his already struggling opponent to concede the break.
Murray, who had looked vulnerable on his serve throughout the set, staved off two break points to move 6-5 ahead.
Both men tightened up as the match moved towards its climax, with Murray wasting his first match point on the del Potro serve by netting a return.
But he wasn't about to refuse a second invitation and when del Potro hit his shot into the net, Murray looked to the sky in disbelief.
The two men embraced at the net, hugging each other at the end of a marathon match.
Murray cried into his towel while del Potro wiped away the tears from his eyes, taking the applause from a crowd which had backed him throughout the tournament.
For Murray, yet more history -- the first man to ever retain the Olympic singles title. For del Potro, who left the court to the crowd chanting his name, this is not the end -- but hopefully the beginning of a new chapter of the sport's most loved players.
Nadal, meanwhile, failed to add to his men's doubles gold from Rio as he lost the bronze playoff against Japan's Kei Nishikori.
Earlier, Russian pair Ekaterina Makarova and Elena Vesnina won gold in the women's doubles.
The duo overcame Switzerland's Martina Hingis and Timea Bacsinszky 6-4 6-4.
In the mixed doubles, Venus Williams was denied a record fifth gold medal after losing out in Sunday's final.
Williams and partner Rajeev Ram were beaten in three sets by fellow Americans Bethanie Mattek-Sands and Jack Sock.
But the silver means the 36-year-old matched the most medals won by a tennis Olympian, equaling the five held by Britain's Kathleen McKane Godfree from the 1920 and '24 Games.