"I am disappointed to withdraw from the Miami Open due to a left knee injury," the former world number one said in a statement.
"I hope to be back next year to play at this one-of-a-kind tournament in front of the incredible fans here in Miami."
The eight-times Miami champion had begun the tournament with a tough three-set victory over Sweden's Rebecca Peterson, winning 6-3 1-6 6-1 on Friday.
"I knew I could play a lot better than I was playing," Williams had said afterwards of her error-ridden second set.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
"I just said, 'Okay, you're better than this, Serena.'"
At Indian Wells, Williams had claimed a 7-5, 6-3 victory over two-time Grand Slam winner Victoria Azarenka before being forced to retire from her third round match against Garbine Muguruza, when trailing 6-3, 1-0.
(Reporting by Gene Cherry in Raleigh, North Carolina; Editing by Ian Chadband)
