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, the second seed, had been hoping to collect his 11th major in his 14th Grand Slam final, but instead slumped to his sixth defeat in six meetings in 2011 against Djokovic.
The red-hot Serb who triumphed in a four-hour, 10-minute final featuring breathtaking shot-making, rock-solid defence, gruelling rallies as well as warnings for both men for taking too long between points.
Victory also allowed Djokovic, now just the sixth man to win three Grand Slams in the same year, to close in further on John McEnroe's 1984 winning record of 82 wins against just three defeats.
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 last just over 17 minutes and 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 strain, 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.