Williams, a six-time winner at Flushing Meadows, has had an injury-marred season and limped out of her first-round match at Wimbledon in tears due to the leg injury.
The 39-year-old, who has been on the hunt for an elusive 24th major, skipped the Olympics in Tokyo and also opted out of the Cincinnati Masters, a tune-up event to the US Open.
“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 a statement on Instagram.
“New York is one of the most exciting cities in the world and one of my favourite places to play — I’ll miss seeing the fans but will be cheering everyone from afar.”
Williams is the latest big name to pull out of the tournament after reigning men’s champion Dominic Thiem and four-time winner Rafael Nadal ended their 2021 season due to injuries.
The main draw of the US Open gets underway in New York on Monday.