The 43rd-ranked Rogers recovered from a 5-2 deficit in the third set to push the affair into a tiebreak, securing the biggest upset of the tournament thus far in front of an electric New York crowd inside Arthur Ashe Stadium.
"I just tried to fight for every point. That's so cliche, I'm sorry. You guys were awesome. I didn't want to leave," Rogers said.
"I just said you know make balls, try to stay in this match, can't get any worse, you lost to her every time. So, try something different."
There were early signs of trouble for heavy favorite Barty, who handed Rogers a break with four double faults in the third game, and got fewer than half of her first serves in as she committed 17 unforced errors during the first set.
The Wimbledon champion found her form in the second set, getting a critical break in the fourth game with a forehand winner and again converting on break point in the sixth as Rogers whacked the ball into the net.
Up two breaks in the final set, Barty appeared poised to walk away with the win but couldn't hang on as her stellar 2021 crashed to an end.
An astonished Rogers held her hands to her face as she clinched the match, defeating Barty for the first time in six meetings.
"I was just trying to stay in the point longer than Ash. She was handling my pace really well tonight. I felt like the harder I hit the ball, the better she hit," said Rogers, the only American woman remaining in the tournament.
It was the second major upset of the women's tournament at Flushing Meadows, after 18-year-old Leylah Fernandez defeated four-time Grand Slam winner Naomi Osaka on Saturday (NZT).
Rogers will face Britain's teen phenom Emma Raducanu in the fourth round.
Meanwhile, men's top seed Novak Djokovic has stayed on course for a record 21st major title, that would complete the calendar Grand Slam, with a 6-7(4) 6-3 6-3 6-2 fourth round win over Kei Nishikori at the US Open.
Following first ever meetings with Denmark's Holger Rune and Dutchman Tallon Griekspoor, Djokovic faced a seasoned campaigner in Nishikori, who was runner-up at the 2014 US Open having beaten the Serb to move into that year's final.
Since then it has been one-way traffic in the rivalry with Djokovic sweeping 17 straight contests against the Japanese player, improving his head-to-head record to 18-2.
But after Nishikori's 6-2 6-0 quarter-final thumping at the hands of the world number one at the Tokyo Olympics, the 31-year-old made Djokovic sweat for his victory.
Usually the headliner under the Arthur Ashe Stadium lights, Djokovic made a matinee appearance on Saturday and appeared unsettled by the conditions as he went to work under a blazing sun.
A tight opening set was snatched by Nishikori in a tiebreak before Djokovic began to settle into the contest, breaking the Japanese player twice in the second on his way to levelling the match at a set apiece.
In another workmanlike effort, the top seed took the decisive break in the third to go ahead 5-3 then held serve for a 2-1 lead.
Now in control, Djokovic would leave Nishikori no openings to hope for a comeback, storming through the last four games of the fourth set to close out the contest in style.
Djokovic now awaits the winner of the match between US wildcard Jenson Brooksby and Russian Aslan Karatsev.