The brutal conditions turned the match between Sharapova and the 10th seeded Wozniacki into a battle of survival, a fight the fifth seeded Russian could not win.
Her departure leaves only top seed Serena Williams and Canadian seventh seed Eugenie Bouchard the only remaining members of the top eight still in action heading into the second week of the year's final grand slam.
"The depth of the women's game now is so high," said Wozniacki. "The level is high. So it's never easy.
"I knew that I had Maria, so that was my task to kind of complete. I didn't really look further.
"It's always easy on paper but never easy in reality. If it was, then all of us would be sitting here as number one in the world and plenty of grand slam titles in our pockets."
A grand slam title is the major hole in Wozniacki's considerable resume which includes a stint as world number one and 22 career titles, the fourth most among active players.
A runner-up at the U.S. Open in 2009, Wozniacki may never have a better opportunity to return to the final with the draw having opened up with all the upsets.
"I have had a great summer and I told Serena I'm pretty tired of her," Wozniacki. "Twice she beat me in three sets. I said, "Can you just get out of my way?"
"This one was a great win for me. For me, I think mentally as well to get that in my pocket is kind of nice.
"I still have hopefully a few good matches in me here in this tournament. It's just exciting to be in the quarters once more."
After Wozniacki took the opening set and Sharapova leveled the match officials declared the heat rule in effect, both players leaving the sizzling stadium as soaring temperatures and stifling humidity made conditions too dangerous to play.
Action resumed 12 minutes later but not before Sharapova was warned for not returning to the court on time.
Wozniacki, who is training to run the New York marathon later this year seemed better equipped to handle the punishing conditions as she turned up her own heat on the French Open champion in the third set.
"I think it will help me a lot," said Wozniacki. "Today was a tough battle out there. It was humid; it was hot; I had to change my dress.
"That rarely happens. It was just soaked. Definitely it's helping (the training), because I felt fresh out there and I felt like I could keep going."
The critical break in the third came after a spectacular point when the 24-year-old Dane raced three times across the baseline to retrieve in miraculous fashion, with Sharapova netting a backhand volley on the last shot to fall behind 3-1.
Wozniacki, a former world number one looking for her first grand slam title, broke the French Open champion again for good measure in the final game to return to a grand slam quarter-final for the first time since the 2012 Australian Open, a stretch of 11 slams.
"I think the first two sets both of us maybe didn't play to our best," said Wozniacki. "She played really well in the second set.
"By the end of the second set I just thought to myself, try to hit through the ball. Just go for your shots.
"I said, okay, win or lose, I'm going to go for my shots. I'm going to go for it. This is the only chance I have to win. If I'm going to lose, at least I'm going to do it with dignity."
Wozniacki now meets Italian 13th seed Sara Errani, who became the first player to reach the quarter-finals at the US Open by ending the rejuvenated run of veteran Mirjana Lucic-Baroni, in the last eight.
Errani, playing deftly defensive tennis, withstood a brilliant second set from the 32-year-old Croat to register a 6-3 2-6 6-0 victory to launch the Day Seven program on another windy day at Arthur Ashe Stadium.
The 121st-ranked Lucic-Baroni, who bounced second seed Simona Halep in the third round for her best grand slam advance since reaching 1999 Wimbledon semi-finals, made 46 winners and registered 69 unforced errors against the steady Italian.
In the day's other matches, Swiss 17-year-old Belinda Bencic continued her rapid rise with a 7-6(5) 6-3 victory over Jelena Jankovic to reach her first Grand Slam quarter-final.
And in the last eight Bencic will face Peng Shuai, Agnieszka Radwanska's conqueror knocking out Wimbledon semi-finalist and Czech 14th seed Lucie Safarova 6-3 6-4.
- Sports & Recreation