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.
"When I had the surgery on my elbow I could truly understand what Juan Martin was going through", Djokovic said.More news: The plaid shirt guy from the Trump rally reveals his identity
More news: 4 dead, including gunman, in Cincinnati office shooting
More news: Third Moon-Kim summit to be held September 18-20: envoy
But off the back of a 24-shot rally, Djokovic broke again for 5-3 and he was within tantalising touching distance of his 14th Grand Slam title, just three months after he had left Roland Garros in despair after a shattering quarter-final exit.
Djokovic had lost five previous finals at Flushing Meadows, but he was determined to make amends for his lack of trophies in NY as his defensive ability combined with his ruthless prowess saw him break in the fourth game, although Del Potro was not in the mood to give up so easily as he hit straight back. But when Djokovic faced three break points in the following game, an epic that required 22 points to settle, he saved them all.
Djokovic and Del Potro walked on Arthur Ashe Stadium court with the Billie Jean King National Tennis Center still buzzing over the controversial women's final on Saturday, won by Japan's Naomi Osaka after Serena Williams incurred three code violations.
Throughout the match, Djokovic patiently prodded del Potro with shape and slice, repeatedly turning defense into attack with unrelenting depth and precision that kept the Argentine on his back foot for much of the three-hour, 16-minute match.
He also became just the second man - after Federer - to win three or more titles at three separate Slams and the seventh to win at least three US Opens.