Wozniacki is a two-time runner-up at Flushing Meadows, but she is unseeded and ranked only 74th after a season filled with injuries and poor results.
She hadn't won a match at a major in 2016 until arriving in New York. She lost in the US Open finals in 2009 against Kim Clijsters and in 2014 against Serena Williams.
On Sunday, Wozniacki made only seven unforced errors, 26 fewer than Keys.
Anastasija Sevastova, who retired from tennis for nearly two years, has reached her first major quarterfinal.
Sevastova upset 13th-seeded Johanna Konta 6-4, 7-5 on Sunday to become the first Latvian woman to make the final eight at a Grand Slam since Larisa Savchenko in 1994.
Still just 26, Sevastova retired in 2013 because of a series of injuries that had made tennis no fun anymore. But she returned to the sport at the start of last season, and her ranking has steadily climbed to 48th.
Her previous best run at a major was a round of 16 appearance at the 2011 Australian Open.
As in her second-round upset of third-seeded Garbine Muguruza, Sevastova struggled to serve out the match.
And as in that victory over the French Open champ, she finally closed out the win with a service break.
Sevastova broke Konta seven times in 11 service games.
Konta, an Australian Open semifinalist, collapsed to the court with trouble breathing during her second-round match, but she didn't appear to have any physical problems Sunday.
Roberta Vinci, last year's US Open runner-up, is back in the quarterfinals. The seventh-seeded Italian beat 99th-ranked Lesia Tsurenko 7-6 (5), 6-2 on Sunday.
Vinci has never reached the quarters at any of the other three Grand Slams, but she's now done it four times at Flushing Meadows.
She made her first major final here last year at age 32, stunning Serena Williams in the semis to thwart the American's Grand Slam bid.
Vinci has been bothered by an injured left Achilles tendon and struggled physically at times Sunday.
Exhausted after the match, she had tears in her eyes. The 27-year-old Tsurenko had never been past the third round at a major before this tournament.