Saville drove Swiatek mad at times with her relentless retrieving and crafty tactics before the defending champion prevailed 6-3 6-4 to extend her winning streak at Flushing Meadows to nine matches.
Saville's departure leaves Ajla Tomljanovic as the lone Australian remaining in the women's draw.
The 2022 quarter-finalist plays fourth-seeded Australian Open runner-up Elena Rybakina later on Wednesday (Thursday AEST) for a place in the third round.
Saville only resumed playing in June after nine months out recovering from a torn ACL.
But the one-time top-20 star defied her ranking of No.322 in the world to put the top seed through the ringer on Louis Armstrong Stadium.
Saville upset Swiatek with clever drop shots, lobs and moon balls to drag the four-time grand slam champion out of her rhythm and draw 22 unforced errors from the title favourite.
Swiatek was even hit with a time violation after exceeding the clock shot trying to serve out the match after one particularly lung-busting rally to bring up match point.
Saville, though, ultimately paid the price for a lack of second-serve firepower.
She won only one point from 18 after failing to land her first serve, enabling Swiatek to break her three times and eventually close out the contest after one hour and 33 minutes.
"For sure it wasn't easy," Swiatek said.
"The rhythm of the match was really weird so I'm happy that I just tried to play my game and play aggressively with a lot of tenacity.
"I'm just happy to be in the third round."
Swiatek next faces Slovenia's world No.145 Kaja Juvan on Friday (Saturday AEST) for a spot in the last 16.