The South African, who reached the 2017 final in New York where he lost to Rafa Nadal, has not competed since he lost in the third round at Wimbledon last month.
Anderson, who was the 16th seed at the year’s final Grand Slam, was in the same quarter of the draw as defending champion Novak Djokovic and could have met the top-seeded Serb in the fourth round.
The 33-year-old South African, who has been limited to five tournaments this season, was aiming to return to action for the first time since Wimbledon. After also struggling with a right elbow injury earlier in the year, Anderson was bidding to add to his 11-4 record in the coming fortnight in Flushing Meadows.
Anderson will be replaced in the draw by lucky loser Paolo Lorenzi of Italy.