The 19th-seeded Williams, at 34 the oldest woman left in the draw, had departed in the second round at Flushing Meadows three years in a row.
In 2011, Williams withdrew before she was supposed to play Sabine Lisicki in the second round, announcing a diagnosis with an energy-sapping illness. The American lost second-round matches to Angelique Kerber in 2012, and to Zheng Jie last year.
Williams won the U.S. Open in 2000 and 2001, part of her collection of seven Grand Slam singles titles.
The Canadian Press