In a battle between two former US Open champions, the veteran Australian came out on top after more than four hours, winning 6-4 5-7 3-6 7-6 (2) 6-1, in one of the biggest upsets of the tournament.
Del Potro, who stunned Roger Federer to win the 2009 US Open, was one of the favourites to win the men's singles title but the towering Argentine was unable to find an answer to Hewitt's counter-punches as the pair slugged it out like two heavyweight boxers.
"It's amazing," Hewitt said on-court. "I was pumped up when I won my first-round match because I knew I was playing Del Potro and we could be on Arthur Ashe (Stadium).
"I don't know how many years I have left in me so I was just hanging to get back on this court again."
Hewitt may no longer be as fast as he was when he upset Pete Sampras to win the final 12 years ago but the 32-year-old showed he had lost none of his combative spirit.
Scrambling around the centre court to keep up with his younger opponent, he fetched more balls than a golden retriever, and hit a string of inch-perfect winners.
His biggest flaw, however, remains his serve, which lacks the power of most of his opponents and it threatened to let him down.
After snatching the opening set, Hewitt, who also won Wimbledon in 2002, had a perfect opportunity to take a two-set lead.
He was just a point away on his own serve when he double-faulted. Del Potro went on to break him and take the set and seized the momentum.
The 24-year-old Del Potro, seeded sixth at Flushing Meadows, won the third set but was starting to run out of gas.
He found himself down a break in the fourth and although Hewitt failed to serve out the set, the Australian won the ensuing tie-breaker 7-2 to send the match into a deciding fifth set as the boisterous New York roared with approval.
Del Potro blinked first and Hewitt pounced to break his serve twice and jumped out to a 5-1 lead. The Argentine saved a match point on his own serve but double-faulted on the second as Hewitt celebrated a remarkable victory.
His prize for winning was a third-round clash with the unseeded Russian Evgeny Donskoy, who won his own five-set marathon against Germany's Peter Gojowczyk 6-3 6-4 3-6 4-6 6-3, but Hewitt was not looking too far ahead as he soaked up the moment.
"A couple of years ago, when I had a couple of foot surgeries, I didn't know if I'd ever play tennis again," said Hewitt, who has fallen to 66th in the rankings.
"It was a hell of a lot of fun, I cherish every match I get. This is why I still play, to have moments like this."
- Sports & Recreation
- Del Potro