Murray put the disappointment of losing the Wimbledon final last month behind him to stun Federer 6-2, 6-1, 6-4 in under two hours on Centre Court.
Murray had never beaten Federer over best of five sets in three attempts going into the final and most pundits were predicting another victory for the Swiss who was aiming to match Andre Agassi and Rafael Nadal by adding singles gold to the career Grand Slam.
However Murray was in form of his life and he revealed afterwards that he's been inspired by the achievements of the British Olympic team this week, in particular Mo Farah and Katherine Grainger. The latter finally struck rowing gold on Friday after missing out at the Sydney, Athens and Beijing Games.
"This was one of the biggest wins of my life," Murray said. "I have had a lot of tough losses in my career and this is the best way to come back from the Wimbledon final. This week has been incredible for me, the support has been amazing at all of the Olympic the events."
"I watched the athletics last night and the way Mo Farah won gave me a boost coming into today. I didn't expect that [being crowned Olympic champion] at the start of the week. I thought I'd go deep into the tournament but I felt so fresh today. It's amazing."