The American came into the tournament not having played since Wimbledon because of a virus and, after her first-round win over Vesna Dolonts, Williams admitted she had only resumed full practice last week.
She looked understandably rusty and appeared still to be struggling with the virus, and the reason for her withdrawal was given as "an unspecified illness".
The two-time former champion's clash with 22nd seed Sabine Lisicki was expected to be one of the highlights of the third day's play but instead the German, who reached the semi-finals of Wimbledon this year, was given a free passage through.
Williams later revealed that she is suffering from the auto-immune disease Sjogren's Syndrome.
The American said in a statement: "I'm really disappointed to have to withdraw from this year's US Open.
"I have been recently diagnosed with Sjogren's Syndrome, an auto-immune disease which is an ongoing medical condition that affects my energy level and causes fatigue and joint pain.
"I enjoyed playing my first match here and wish I could continue but right now I am unable to. I am thankful I finally have a diagnosis and am now focused on getting better and returning to the court soon."
Sjogren's Syndrome affects as many as four million people in the United States, the vast majority of them women, and there is no known cure.
The rheumatic disease attacks and destroys the exocrine glands that produce tears and saliva, causing dryness of the eyes and mouth and increased fatigue, and can lead to other more serious conditions.
Lisicki revealed she had seen Williams before the match looking ready to play, and the German was disappointed with the manner in which she progressed.
"I saw her and I heard she practised as usual," said Lisicki. "I saw her in her match clothes so was fully prepared and really looking forward to the match. I hope she will be fine quick.
"I love those big matches and playing against Venus. We had two amazing matches the last two meetings. But that's tennis. Sometimes you get injured or sick."
Williams has had another injury-plagued year, playing only four tournaments, and she will plummet from her current ranking of 36th after reaching the semi-finals at Flushing Meadows last year.
Questions will inevitably be asked about whether this is the end of the 31-year-old's career, but Lisicki does not think that will be the case.
She added: "I think she's a tough girl and I think she'll come back. It would be unfortunate if she couldn't.
"Serena and Venus both are amazing players and it's nice to have them in the women's sport. I hope she comes back. It makes it more challenging."
Discussing her struggles after beating Dolonts on Monday night, Williams revealed she had found it difficult even to go out onto the practice court.
She said: "I was able to stay on the court only because my anxiety was high if I didn't play. I was able to hit balls, but it wasn't like a real practice.
"In fact, my mind wasn't there. Let me try to make it to X number of times. Let me try to get to that. When I was done, I was so excited to get off the court."