The top seed entered Rod Laver Arena with a frown and grumbled as she miscued groundstrokes and had little penetration on her first serve against the 26th-seeded Ukrainian.
However, she dug herself out of the hole and sealed the match in 99 minutes with a searing cross-court return.
The American will next play Garbine Muguruza for a place in the quarter-finals.
US Open
'I just needed to stop' - Williams opens up about retiring at US Open
A DAY AGO
Laver Cup
'The way it should end' - Federer, Serena should stick to retirement plans, says McEnroe
21/09/2022 AT 05:22
Laver Cup
'It's an honour to know you' - Djokovic pens emotional tribute to retiring Federer
16/09/2022 AT 14:43