Wozniacki lost 6-4, 6-2 to 36th-ranked Lesia Tsurenko of Ukraine on Thursday.
"She was playing smarter than me. She played the game that I was supposed to be playing. She got a lot of balls back. She played with the angles. She waited for the short ball. When the short ball came, she played aggressive. She went back and kept the ball in play when she had to," Wozniacki said. "I should have made better adjustments. I just didn't."
Wozniacki is the reigning Australian Open champion and twice was the runner-up at Flushing Meadows in New York, in 2009 and 2014. But she's now lost in the second round at two consecutive majors, after doing the same at Wimbledon.
Her loss means the US Open's top two women already are gone after only four days of action; Halep lost on Monday. A third top-10 seed lost, too: No. 9 Julia Goerges.
It's the second time in the Open Era the top two women's seeds lost in the first two rounds of a major; the other time came at the 2014 French Open, which saw the early exits of Serena Williams and Li Na.
"Guess Wimbledon used to have a 'Graveyard Court,'" Wozniacki said, referring to the old Court No. 2 at the All England Club, which was infamous for upsets before it was torn down. "Maybe that is going to be the new 'Graveyard Court.' I think it's a little too early to tell."
Tsurenko has never been past the fourth round at any Grand Slam tournament. She appeared to hurt her right forearm early in Thursday night's match, and a trainer came out to massage Tsurenko at changeovers.
Next up for Sharapova is a third-round matchup against 2017 French Open champion Jelena Ostapenko.
Sharapova has the best win-loss record in US Open night matches among all players since 1980. She's 22-0 in such matches, ahead of Pete Sampras who is second with a win-loss record of 20-0.
Keys, the US Open runner-up last year, served eight aces and never lost her serve in a match that lasted 1 hour, 12 minutes.
The No. 14 seed will play Aleksandra Krunic in the next round.
Kerber moved ahead in a third set filled with lengthy baseline exchanges by breaking in the next-to-last game when Larsson double-faulted.
The No. 4-seeded Kerber won the US Open in 2016. Her other Grand Slam trophies came at that year's Australian Open and this year's Wimbledon.
Belarus has seen top performances from its athletes so far, as Aliaksandra Sasnovich and Aryna Sabalenka each won their second-round matches. With former No. 1 Victoria Azarenka and Vera Lapko also winning their first matches at Flushing Meadows, Belarus had four players reach the second round of a Grand Slam for the first time.
Azarenka already had reached the third round and was joined by the 33rd-ranked Sasnovich, who upset No. 11 seed Daria Kasatkina 6-2, 7-6 (3), and No. 26 seed Sabalenka, who ousted Vera Zvonareva 6-3, 7-6 (7).
Information from the Associated Press was used in this report.