A final serve forced Ahn into an error as Williams claimed a record 102nd US Open match victory, her first straight-sets win since the sport returned from the COVID-19 shutdown.
Williams, who next faces Margarita Gasparyan of Russia, said she struggled to find her rhythm at first as Ahn displayed impressive versatility.
“She really strikes the ball really hard. She mixes up a lot. She plays a lot of the different shots,” said Williams.
“You don’t really know what to expect.”
In typical fashion, Williams used her powerful serve to gain the advantage, winning 85 per cent of her first-serve points with a fastest serve of 200 km/h.
One of the most popular headliners at Flushing Meadows every year, she faced empty stands inside Arthur Ashe Stadium with spectators barred from the Billie Jean King National Tennis Center due to concerns over the ongoing COVID-19 outbreak.
“The hardest is making sure you stay pumped,” Williams said, reflecting on the lack of fans. “For me it was clearly easy because I’m always overly passionate. I love being passionate. It’s what I’m best at.”
Williams, who reached the final of the US Open in her last two campaigns, is gunning for her first grand slam title since 2017 to equal Margaret Court’s record in a depleted field in which six of the top 10 players are not competing this year.
She had a frustrating stretch of performances leading up to the tournament, losing in the Top Seed Open quarter-finals before crashing out of the Western and Southern Open in the third round.
“I’ve been losing matches on literally one point that could swing a match a different way. I’ve been playing a ton of tight matches,” Williams said.
“I felt like, all right, I just wanted to be Serena focused from the first point to the last point no matter what happens.”
The news wasn’t as good for older sister Venus, who was bailed out in straight sets by No.20 seed Karolina Muchova.
Earlier, two-time grand slam winner Garbine Muguruza advanced, as did Australian Open champion Sofia Kenin, No.9 seed Johanna Konta and 16th seed Elise Mertens.
Sloane Stephens, the US Open champion three years ago, beat Romania’s Mihaela Buzarnescu in straight sets.
No. 10 seed Muguruza beat Nao Hibino 6-4, 6-4 and thought about Carla Suarez Navarro, who shared her diagnosis with Hodgkin lymphoma publicly earlier in the day.
Suarez Navarro revealed in a tweeted video that she will need six months of chemotherapy to treat Hodgkin lymphoma. She dropped out of the grand slam event last month with plans to retire.
“I was expecting to see her in this tournament,” Muguruza said. “You know, she’s such a nice woman, so sweet, so kind, so humble.
“I, for sure, will dedicate this win to her because I want her to feel that we are behind her, that I am behind her, and I will go and see her at some point when it’s fine.”
Suarez Navarro, who turns 32 on Thursday, was ranked as high as No. 6 and reached grand slam quarter-finals seven times, including at Flushing Meadows in 2013 and 2018.