Djokovic fought back from losing the first set to take a 2-1 lead, but he was then taken to a gripping fifth set by resurgent Nadal before winning 5-7, 6-4, 6-2, 6-7 (5/7), 7-5 for his third consecutive major title.
"I will never forget this match. Even though I lost, it was something really special for me. Thank you very much, I will come back here a lot and I will keep fighting," said Nadal after the match.
Djokovic, who picks up a cheque for Aus$2.3 million (USD 2.4 million), has now beaten the Spaniard in three consecutive grand slam finals and seven consecutive title matches overall.
"Rafa, you're one of the best players ever. You're one of the most respected guys on the tour," he said. "We made history tonight, and unfortunately there couldn't be two winners. But I wish you all the best for this season and I hope that we will have many more matches like this and many more finals." Djokovic's win, his fifth grand slam title, means he joins rarified company.
Only Rod Laver, Pete Sampras, Roger Federer (twice) and Nadal have previously won three consecutive grand slams in the open era. The Serb, who had a gruelling five-set semi-final win over Andy Murray, came into the final with a day less rest than Nadal, and having complained about allergy-related breathing problems in Melbourne.
He struggled to get into the match early on against his never-say-die opponent, slamming racquet to the ground when he was broken and falling a set behind but, re-energised, he found his rhythm in the second set to level.