The world number one produced a masterful display of tactics and precision then regained his composure after failing to serve out the match in the third set to seal victory after four hours and 10 minutes.
The win provided Djokovic with his first US Open title after he had twice been beaten in the final, including last year's decider against Nadal, and his third Grand Slam this year after having won the Australian Open and Wimbledon.
"It really sounds unreal. It's an incredible feeling," Djokovic said.
"I've had an amazing year and it keeps going. Every time I play Rafa, it's a big challenge. I want to congratulate him on a great tournament again and I wish that we have many more tough matches in the upcoming years."
Nadal, who was the undisputed king of tennis 12 months ago when he completed his collection of Grand Slam titles at Flushing Meadows, was again left searching for answers after a season in which he has lost six finals, including Wimbledon, and the number one ranking to Djokovic.
"Obviously I'm disappointed now but this guy's done unbelievable things," Nadal said. "I tried my best in every moment. These kind of matches are very difficult, it brings your body to the limit. I tried to play crazy but he always makes fantastic comebacks. That's tennis."
No matter how hard he tried, Nadal could not find a way to get on top of the Serbian, who played at an extraordinary high-level despite windy conditions at Arthur Ashe Stadium.
To his credit, Nadal fought back gamely to win the third set in a tiebreaker after Djokovic came within two points of wrapping up the championship on his own serve.
There were signs of concern for the Serbian, who saved two match points in his semi-final exhausting win over Roger Federer, when he called for the trainer to treat his aching back at the start of the fourth set but he recovered and broke Nadal's opening serve to regain control.
After consolidating his lead by holding his next two service games, he broke Nadal's serve again, for the 11th time in the match, the served out victory, collapsing on the court in celebration after smashing a winner past his opponent.
Both players produced some incredible tennis, including some epic rallies that had the packed centre court crowd roaring at the top of their lungs, but it was Djokovic who won all the key moments.
In each of the first two sets, Nadal jumped out to a 2-0 lead, only to be reined in by Djokovic, who kept the Spanish left-hander under constant pressure with some monster returns that landed right at his feet.
Djokovic reeled off six straight games to take the opening set after 53 minutes but found himself down 2-0 again at the start of the second.
He broke back after an epic third game that lasted more than 17 minutes and included eight deuces and led 4-2. Nadal got back to 4-4 but another service break cost him the set.
The third set was the longest, lasting 84 minutes. Both players were broken three times but Djokovic had the chance to serve out the match.
He failed but made amends by racing through the fourth set in 42 minutes to leave no one in doubt that he is the best player in the world.
- Related links