The Dane broke through in the first game of the match before securing the double to go 4-1 ahead. The pair then exchanged breaks before Wozniacki served it out 6-2.
Roles were reversed early in the second set as this time it was the Grand Slam debutante who raced into the lead.
At 3-1 down, Wozniacki managed to get back on serve but holding her own was proving to be a difficult task, with Duan replying with another break to go 4-2 ahead.
While serving to force a deciding set, the 24-year-old Chinese player slashed wildly at a forehand to give Wozniacki the break back. The Dane then rattled off her fourth game in a row to see her serve for the match.
All the momentum was with Wozniacki, but she still had to save break points before eventually sealing her place in the second round at Flushing Meadows.