The 19-year-old shrugged off two slips during the free skate programme to take his first major title, ahead of three-time world champion Patrick Chan of Canada.
Kazakhstan’s Denis Ten, world silver medallist in 2013, moved up from ninth place after the short programme to take bronze, recording a score of 171.04 to total 255.10.
In claiming the title, Hanyu became the first ever male Japanese skater to win figure skating gold.
The 19 year-old etched his name even further into the history books by becoming the youngest Olympic champion since Richard Button (USA) won the 1948 Games at just 18.
Two falls could not prevent Hanyu, bronze medallist at the 2012 World Championships, from fending off the challenge of Canada’s Patrick Chan, three-time world champion and favourite for gold going into the free skate.
Hanyu’s score of 178.64 gave him a commanding total of 280.09 building on the lead he had amassed in the short programme, when he scored 101.45 and became the first ever skater to surpass the 100 mark in the discipline.
That record-breaking performance had given him a lead of 3.93 points over Chan, and he stretched that margin in the free skate to take the title by 4.47 points despite a two-point deduction, skating to Nino Rota’s ‘Romeo and Juliet’.
Skating third from last, Chan seemed to have a clear shot at Hanyu’s score but his performance to Vivaldi’s ‘Four Seasons’ and ‘Concerto Grosso’ contained several errors and his score of 178.10 was not enough to challenge his rival.
Hanyu could not contain his disbelief on learning he had taken gold, and had to compose himself before taking in the significance of his achievement.
“A win’s a win’s a win. It’s going to sink in. It’s a gift for my country,” he said.
Ten’s clean free skate to ‘The Young Lady and The Hooligan’ confirmed a first Olympic figure skating bronze for Kazakhstan and signalled a superb return to form after a season hampered by injury and illness.
Hanyu’s victory ensured that his coach, Brian Orser, a two-time Olympic silver medallist himself, had masterminded a second consecutive Olympic title having guided Republic of Korea’s Yuna Kim to gold in the women’s competition at Vancouver 2010.