Nadal, the defending champion, needed almost five hours to defeat ninth seed Thiem in a deciding tie-break after losing the opening set 6-0.
Nadal, who was on court for four hours and 48 minutes in a tie which finished at 2.04am local time in NY (7.04am BST), commented on the humidity of the playing conditions that has troubled so many players in this year's Open, and broke down his performance.
He said: "I'm very appreciative of that".
Nadal won the match by the narrowest margin possible - a 7-5 final-set tiebreaker - to win by a 0-6 6-4 7-5 6-7 (4-7) 7-6 (7-5).
And the 25-year-old, the only man to beat Nadal on clay for the last two seasons, set about showing his opponent he meant serious business in his first grand slam quarter-final outside of the French Open. Nadal moves to 8-3 all time against the Austrian to set up a semifinal match against No. 3 seed Juan Martín del Potro on Friday.
The fourth set was a wild 81-minute ride that began with Thiem facing break points, saw the Austrian threaten a double break before being pegged back and then a tired Nadal miss a chance to win the match.
Nafta talks to resume in afternoon after Canada cites 'goodwill'
Quebec has insisted it's crucial to maintain protections in this area in order for it to maintain its francophone culture. The president also said the US would be fine if a deal can't be reached with its northern neighbour.
Thiem then grabbed a 4-3 lead in the third which he stretched to 5-3 but then it was his turn to crack as Nadal raced away with three games to claim a two sets to one lead.
Under the lights of Arthur Ashe Stadium, Nadal and Thiem delivered the NY crowd another memorable marathon, this time for a spot in the US Open semifinals. Of course, my level dropped a little bit. "It was a great battle". "The only thing that I was thinking was to finish this first set and forget about this start". "He is young and has plenty of time to win tournaments". But Thiem saved all three break points before denying Nadal a fourth opportunity with a stunning volley at the end of a remarkable point. I know how he plays, he knows how I am playing.
"That's what I was preparing for", Thiem said.
John Isner continued the best season of his career by reaching his first quarter-final in NY for seven years. He always plays and practices with a great attitude.
"I would say [this is] the first really epic match I played". I am focused on trying to make that happen.
"It's been a great battle, the conditions were tough, a lot of humidity".
Nadal has played a total of 15 hours, 54 minutes through five matches here. I think we nearly all the time have great matches.