It was 37-year-old Serena's earliest exit at the Slams since a third-round loss to Alize Cornet at Wimbledon in 2014.
A Wimbledon semifinalist in 2017, the 62nd-ranked Querrey cited an abdominal problem as the reason for his withdrawal.
Having clinched the 2018 Wimbledon and US Open titles and then a seventh Australian Open crown in January this year, the Serb is close to another 'Djoko Slam'.
It could offer the five-time former winner a chance of some grass-court action ahead of Wimbledon if he is fit.
She was knocked out in the first round of Wimbledon in 2017 and failed to qualify in 2018.
The South African world number seven famously beat the 37-year-old at Wimbledon in 2018 over five dramatic sets.
After toppling Elina Svitolina in three sets, Canada's Bianca Andreescu will face Wimbledon champion Angelique Kerber for the title.
Federer said his failure to defend his Australian Open title changed nothing and his aim was the same as always - to beat Nadal and Djokovic.
Two-time Wimbledon champion Kvitova, who rose to world number two after her Melbourne final loss to Naomi Osaka last Saturday, prevailed 6-2, 7-6 (7/3).
The 31-year-old had earlier said that he intended to retire following the 2019 edition of Wimbledon.