The 28-year-old Argentine 24th seed rallied past Austrian sixth seed Thiem 1-6, 2-6, 6-1, 7-6 (7/1), 6-4 in an emotional fightback for only his second career victory after falling two sets down.
Supporters wearing Argentina football jerseys and chanting "Ole, Ole, Ole" urged on their weary hero from the brink to a stunning endurance-test triumph.
"Oh my God," Del Potro told the crowd. "I was sick the last two days. I came here trying to play the best I can and then when I see this crowd cheering for me, I was trying to play better every game.
"I think I fight like this because of you guys so thank you very much."
In Spanish, Del Potro told his fans he would never forget their inspirational impact.
"Good night to everybody and thank you very much from the heart for the support you gave me," Del Potro said. "Was very useful to not to abandon, not to give up, and this match I will always remember."
Del Potro, the 2009 US Open champion, will next face the winner of a later match between 19-time Grand Slam champion Roger Federer, the Swiss third seed, and German 33rd seed Philipp Kohlschreiber.
Del Potro defeated Federer in a five-set final eight years ago on the New York hardcourts for his only Grand Slam title, snapping his 40-match tournament win streak after dispatching Nadal in the semi-finals.
"Maybe I have the chance to play Roger again in this tournament, which is special for me," Del Potro said, adding, "I would like to have the trophy after these matches."
Asked what he might do to recover for his Wednesday battle for a semi-final berth, the South American replied, "I think it's a nap for me."