US Open finalist Pegula dumped out in China Open last 16
The 15th seed won in convincing fashion, 6-4, 6-0, and faces Poland's Magdalena Frech or China's Zhang Shuai in the quarter-finals.
At 595 in the world, Zhang is the lowest-ranked player to ever reach this stage of the tournament.
The second-seeded American Pegula came into the WTA 1000 event as one of the form players on tour and having reached the final in New York this month, where she was beaten in straight sets by Aryna Sabalenka.
She was no match though for former world number two Badosa, who blitzed the second set after an even first.
Sabalenka, the top seed in the Chinese capital, plays American 18th seed Madison Keys in the last 16.
Defending champion and world number one Iga Swiatek is not involved because of "personal matters".