WATCH the Italian Open LIVE & ONLY on beIN SPORTS | available via Foxtel, Kayo Sports, Fetch TV & beIN SPORTS CONNECT
Halep, the 2018 French Open champion, had dominated the first set against Angelique Kerber, winning 6-1, but came off the court with an apparent calf problem with the scores level at 3-3 in the second.
She received treatment but an emotional Halep was forced to withdraw from the clash, the defending champion handing victory to Kerber.
The Romanian was then helped from the grandstand court, leaving the area with strapping on her leg and a heavy limp, raising doubts about her ability to compete at Roland Garros, where she would likely be one of the favourites.
Earlier Williams made her first appearance on the tour since February, losing the 1,000th match of her glittering career to Nadia Podoroska, who reached the semi-finals in Paris last year.
Podoroska prevailed 7-6 (8-6) 7-5, with 23-time grand slam champion Williams not too downhearted by a defeat to an accomplished clay-court player.
"It's tough to have a first match on clay. It was definitely kind of good to go the distance and to try to be out there, but clearly I can do legions better," Williams said.
"She has a good game, for sure, obviously. She's very consistent. Overall, it was good for me to play such a clay-court player on clay today, but it's a little frustrating. But it's all right. It is what it is.
"I have been training for months, but it feels definitely different on clay to make that last adjustment. Just filling out the game, finding the rhythm. Even sliding and confidence with that, with movement. That's always like a little struggle in the first two matches, and then I'm raring to go."
Osaka has yet to find her footing on clay and the reigning Australian Open champion came up short in the second round as she suffered a surprise loss to Jessica Pegula.
Pegula said after her 7-6 (7-2) 6-2 win: "I know she doesn't love clay, so I just tried to be the clay court player out there today, and it worked just good enough."
World number one Ashleigh Barty had no such difficulties in her 6-4 6-1 over Yaroslava Shvedova, but fourth seed Sofia Kenin was a shock loser to Barbora Krejcikova.
Petra Kvitova was beaten in three sets by Vera Zvonareva but Madrid champion Aryna Sabalenka, last year's French Open champion Iga Swiatek, Elina Svitolina, Karolina Pliskova and Garbine Muguruza all progressed while teenager Coco Gauff knocked out 17th seed Maria Sakkari.