Federer, Nadal and Novak Djokovic share the men's record of 20.
"After careful consideration and following the advice of my doctors and medical team, I have decided to withdraw from the US Open to allow my body to heal completely from a torn hamstring," Williams wrote in Wednesday's post.
Her note ended with: "I'll see you soon."
Williams' coach, Patrick Mouratoglou, also put up a post on social media, saying, "we've done everything we could" and adding: "It is heartbreaking, but this is the only possible decision."
Williams has won six singles championships at the U.S. Open, most recently in 2014. In her five appearances at the hard-court tournament in New York since then, she has made it to the final twice — losing to Naomi Osaka in 2018 and Bianca Andreescu in 2019 — and the semifinals three other times, including last year.
Her best-in-the-game serve and powerful groundstrokes have allowed Williams to remain among the title contenders at the biggest tournaments, especially on hard courts and grass.
This season, she was a semifinalist at the Australian Open in February, before losing to eventual champion Osaka there. At the French Open, played on red clay, Williams lost in the fourth round to Elena Rybakina.
At Wimbledon, Williams was serving while leading 3-1 in her opening match when her left shoe seemed to lose its traction while she was hitting a forehand and her right leg flexed awkwardly.
She tried to continue but eventually needed to stop playing, only the second mid-match retirement of her Grand Slam career and first since 1998.
- AP