An eight-time finalist in NY who had only previously lifted the trophy in 2011 and 2015, the Serbian was made to work hard on Sunday as Del Potro came from a break down in the second and third sets.
The Serbian outlasted the Argentine 6-3 7-6 (7-4) 6-3 in three hours and 15 minutes on Arthur Ashe Stadium in NY.
However, Del Potro and his mighty forehand came to the party, striking back in spectacular fashion to level at 3-3, while the support for the giant Argentine appeared to rattle Djokovic's concentration levels.
A season that started gloomily with elbow surgery after the Australian Open is turning into a brilliant finish for the 31-year-old Serb who has now won three of his last four events including back-to-back majors at Wimbledon and Flushing Meadows.
"I want to say Pete, I love you, you're my idol", said Djokovic of Sampras.
Like the victorious Djokovic, Del Potro has had to overcome injury problems to get back to this stage.
A costly double-fault from Del Potro - his first of the match - and a series of errors saw Djokovic move one game away from victory and after three hours and 16 minutes he completed the job with an unstoppable overhead smash and then lying flat on his back on the court in celebration. But when Djokovic faced three break points in the following game, an epic that required 22 points to settle, he saved them all. The tension lifted in a marathon eighth game that took 20 minutes to decide, Djokovic finally holding to keep the set on serve at 4-4.
After months of struggle and doubt, Novak Djokovic's remarkable comeback has reached its peak.
For Del Potro it wasn't to be, but his return to a Grand Slam final nine years after his first with four wrist surgeries in between deserves huge credit.
In the immediate aftermath of Djokovic's victory, he embraced del Potro at the net in a heartwarming show of class and respect between the friends and foes.