The eighth seed roared to a two-set lead after top seed Nadal struggled with an apparent back injury sustained early in the second set, but the Swiss was left stunned as his opponent suddenly revived in the third at Rod Laver Arena.
Though restricted in his movement, Nadal fought back into the match with a barrage of clean hitting, completely throwing the Swiss off his game who surrendered the third set in a hail of unforced errors.
Wawrinka captured a break in the fourth set, surrendered it with a terrible service game, but recovered again to earn a chance to serve for the match.
He stayed cool when it counted, serving strongly and sealing the win with an imperious forehand rocketing down the line.
A relieved Wawrinka raised his hands in the air in celebration and after shaking hands with a gloomy Nadal, went to console the Spaniard at his chair.
"First, Rafa, I'm really sorry for you, I hope your back is okay, you are a great friend and a great champion," Wawrinka said at the trophy ceremony.
"You did a remarkable comeback last year. For me it's the best grand slam ever.
"Right now I still don't know if I'm dreaming. I guess I'll find out in the morning."
The 2009 champion Nadal shed tears at the trophy ceremony, overcome by the emotion of a roller-coaster match.
"First thing I want to say, is thanks to Stan, we have a great relationship and you really deserve it today, so many congratulations and all the best.
"To all the crowd, it's been an emotional two weeks sorry to finish this way, I tried very, very hard.
"Last year was a tough when I wasn't able to play here, thanks for your support, see you next year."
The triumph capped a remarkable fortnight for Wawrinka who became the first man in 21 years to beat the top two seeds at a grand slam since Sergi Bruguera pulled off the feat at the French Open in 1993.
Five days after ending second seed Novak Djokovic's three-year reign at Melbourne Park, Wawrinka denied a distraught Nadal from becoming only the third man to have won all four majors at least twice.
Though Nadal's injury clearly affected his game, Wawrinka had been well on top of their match early on and surged 3-1 clear in the first set after an early break.
Without a hint of nerves, Wawrinka blasted two aces before holding to lead 4-1, leaving the centre court crowd stunned.
Wawrinka stumbled when serving for the set to fall behind 0-40 but saved them all, as Nadal's returning went awry, and took the set with a crosscourt ace.
In all his previous 12 meetings against Nadal, Wawrinka had never won a set. Breaking that jinx propelled him on.
He broke Nadal in the first game of the second to march to a 2-0 lead before the Spaniard suddenly doubled over in pain.
He grimaced after a first serve and immediately signalled for a trainer and winced again after belting a forehand into the net from the baseline.
Nadal successfully held serve to trail 2-1 but quickly left the court for a medical time out, leaving Wawrinka to argue with the chair umpire about the lack of disclosure over the injury.
Nadal re-emerged after six minutes amid some jeers from the Rod Laver Arena crowd but his movement was clearly restricted and he was unable to generate any pace on his serve.
Wawrinka simply went about his business, marching to a 4-1 lead as Nadal double-faulted repeatedly and struggled to reach wide balls.
Nadal had more treatment on his back from a physio at the change of ends, then underlined his fighting spirit by holding serve to trail 5-2, but Wawrinka went on to serve out the set with an ace.
Whether it was painkillers or just pure grit, Nadal showed signs of a revival in the third set as he saved two break points before holding serve with a barrage of sweetly-struck forehands.
A searing forehand winner down the line gave Nadal two break points and astonishingly, the Spaniard broke a flat-footed Wawrinka when the Swiss bunted a bloodless forehand into the net.
As Nadal rallied, his eighth-seeded opponent sunk, spraying shots all over the court with his concentration clearly affected by the sudden momentum switch.
Still restricted in his movements, Nadal began gunning for the lines and his stand-and-deliver approach saw him march to a 5-2 lead.
With Nadal serving for the set at 5-3, Wawrinka had a chance to break back but was unable to flush the tension out and conceded the set when he smashed a forehand into the net.
As Nadal battled with his body, Wawrinka continued to battle with his mind as he broke Nadal in the final set and then gave it straight back.
Amid the doubts, the Swiss's serve never quite deserted him and it carried him to match point before his forehand sealed it to raise thunderous cheers from the terraces.
- Sports & Recreation