Muguruza is the highest seed to exit the tournament so far.
Garbine Muguruza, the reigning French Open champion and the world No. 3, was upset in the second round of the U.S. Open by Anastasija Sevastova on Wednesday.
Sevastova, 26, prevailed 7-5, 6-4 to advance to the third round of a Grand Slam for just the second time in her career. She had never advanced past the second round of the U.S. Open.
Muguruza's defeat concludes a roller-coaster summer for the Spaniard, who won the French Open in June but crashed out of Wimbledon in the second round.
Sevastova broke Muguruza three times in the opening set, including at 4-5 when Muguruza had a chance to lock up the first set.
The Latvian jumped out to a 5–1 lead in the second set before Muguruza won three straight games. Sevastova closed it out in the 10th game of the second set.
Sevastova will play Kateryna Bondarenko in the third round.