Williams showed no signs of pain when he won his first match of the tournament against Rebecca Peterson. He also did not mention his knee problems during the melee that followed his victory.
The WTA has indicated that it has not received any information about when Williams was injured.
Friday's game was the premiere of Williams at the Hard Rock Stadium, home of the Miami Dolphins and the new central court of the tournament. The Miami Open moved to Miami this year from Key Biscayne, where Williams signed eight career titles.
His visit to this tournament last year was also short-lived when he lost in the first round against Naomi Osaka. Williams retired from the Indian Wells tournament two weeks ago due to a virus.
The 37-year-old American had to play against the 18is The seed of Qiang Wang, who will pass the fourth round.
Williams did not win a tournament from the Australian Tennis Open in 2017, before taking a break for more than a year to become a mother.
"I'm disappointed with the withdrawal from the tournament," Williams said in a statement. It was a sensational experience playing at this year's Hard Rock Stadium and I would like to thank the Miami Open organizers. I hope to return next year to take part in this extraordinary tournament and play in front of the incredible Miami fans. "