Pegula, who beat the fourth-seeded Karolína Plísková for the fourth time this year on Thursday, was unable to follow up against the seventh-seeded Azarenka, losing 6-2, 5-7, 6-4.
Madison Keys upset the top-seeded Aryna Sabalenka 6-4, 1-6, 7-5 to reach the quarterfinals of the German Open.
Keyes, who is ranked 28th, hit three aces and saved four of the six break points she faced.
Evgeniya Rodina made the fourth round of a Slam for the first time on Friday after a 7-5, 5-7, 6-4 win over Madison Keys.
The 36-year-old Serena now cannot meet a top 32 player until the semi-finals after the scattering of the seeds this week.
Sloane Stephens, the world number 83, raced to a 6-3, 6-0 victory over 15th seeded Madison Keys in just over an hour.
US Open champion Sloane Stephens made her best prior Grand Slam run to the 2013 Australian Open semi-finals.
Keys, the 15th seed, was trounced 6-3, 6-0 by world number 83 Stephens in a one-sided final that lasted just over an hour.
After being off tour for 11 months, Stephens easily beat Madison Keys 6-3, 6-0 in the first Grand Slam final for both.