The world number one Serb, who had already won the Australian Open before defeating Nadal at Wimbledon, racked up his 64th win against just two losses all year.
But having been just two points from the title in the 12th game of the third set, his dreams were almost shattered when he dropped the set on a tiebreaker and needed a medical time-out on a strained back muscle.
Victory represented the top-seeded, 24-year-old's fourth career Grand Slam trophy after making his breakthrough at the 2008 Australian Open.
Nadal a 10-time Grand Slam title winner, slumped to his sixth defeat in six meetings in 2011 against Djokovic.
The red-hot Serb eventually triumphed in a four-hour, 10-minute final featuring breathtaking shot-making, rock-solid defence and gruelling rallies.
"US Open....it sounds unreal," said Djokovic, who had to save two match points to beat Roger Federer in a five-set semi-final.
"It's an incredible feeling. I've had an amazing year. To play Rafa is always a great challenge and I hope we have many more tough matches in the years to come."
Nadal, who faced 26 break points and was out-hit in winners with his 32 lagging behind the champion's 55, said he is determined to eventually overturn his losing run at the hands of Djokovic.
"I'm disappointed to lose, but Novak has been doing unbelievable things. What he has done this year will be impossible to repeat," said the world number two.
"We pushed our bodies to the limits, I tried to play aggressive but he was making fantastic comebacks. I fought for every ball."
Djokovic arrived on court sporting a New York fire department baseball cap, a gesture appreciated by the 23,000 crowd, just a day after the 10th anniversary of the September 11 attacks.
Despite the tricky, swirling breeze, Nadal was quickly on top, breaking for a 2-0 lead before the Serb hit straight back for 2-1.
Djokovic fought off three more break points in the fourth game and the Spaniard was made to pay when impressive court coverage allowed the Serb to bury a deep forehand to break for a 3-2 advantage.
A hold and another break, aided by two drop shots which left the struggling Nadal stranded at the back of the court, had Djokovic 5-2 ahead.
The Serb comfortably wrapped up the opener in the eighth game -- his six game in succession -- when the second seed netted a backhand as Djokovic again closed in for a volley.
In a carbon copy of the first set, Nadal was 2-0 ahead in the next before a marathon third game, which lasted just over 17 minutes and included two exhausting rallies of 21 and 27 shots, was claimed by Djokovic on a sixth break point.
He did it in real style, too, three times retrieving the ball from the back of the court before Nadal netted a volley.
The Spaniard was becoming increasingly irritated with his inability to sneak away from his opponent as well as constant movement in the stands.
Djokovic held comfortably before breaking a weary Nadal when the Spaniard served a third double fault after a fifth game which featured another punishing rally of 28 shots.
Nadal avoided a double break in the seventh game and his sudden, new injection of confidence pushed him to even the set at 4-4.
But it was another brief respite as back came the Serb with his sixth break of the final for 5-4 which was converted into a two-set lead when Nadal was made to look uncharacteristically heavy-footed as he fruitlessly tried to chase down a blistering Djokovic forehand winner.
In a rollercoaster third set, Djokovic broke for 2-1, Nadal hit back for 2-2, the Serb broke again for 3-2 before Nadal levelled again for 3-3.
Another lengthy rally, this time 31 shots, punctuated the eighth game where Djokovic saved a break point.
The Serb then nipped to 6-5 on his 20th break point of the final and was just two points from the title at 30-30 when Nadal hit back to take the set to the tiebreaker through which he cruised 7/3.
Djokovic then summoned the trainer for treatment on his back, but incredibly still managed to break for 2-0 and then 5-1 as Nadal's spirit suddenly wilted under a sustained barrage.
A razor-sharp backhand set-up match point and the title was his with a sweeping, killer forehand.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional