Svitolina -- who had a first round bye as fifth seed -- held a match point at 5-2 in the third set before slumping 6-4, 1-6, 7-5 to Belarus Victoria Azarenka in a 2hr 14min battle at the Foro Italico which was twice interrupted because of rain.
Serena earlier announced she was withdrawing having just returned after two months out injured, before she was due to play her older sister Venus for the first time in 21 years in Rome.
The 37-year-old had eased past Sweden's Rebecca Peterson in her first round match on Monday, but a day later could not continue "due to pain in my left knee".
"I'll be concentrating on rehab and look forward to seeing you all at the French Open and next year in Rome," Serena said in a statement.
Her withdrawal sends Venus, the 1999 winner, through to a third round meeting with either Britain's Johanna Konta or US seventh seed Sloane Stephens.
There are now doubts whether Serena can target a record-equalling 24th Grand Slam title in Paris, having played just nine matches this year, and one on clay.
Her last Grand Slam singles title was won at the Australian Open in 2017, where she was pregnant, breaking a tie with Steffi Graf for the most, and she is just one short of Margaret Court.
The three-time French Open winner revealed getting back to fitness has been tougher than she had expected.
"I haven't been able to train or practice a lot, I was out much longer than I expected," she explained.
"I feel like I'm taking it one day at a time."
Nevertheless, last year she arrived at Roland Garros without any clay-court warm-up and still reached the last 16 before retiring before her match against Maria Sharapova, also because of injury.
Svitolina and Azarenka battled late into the night at the Foro Italico before former two-time Australian Open winner Azarenka won through.
Svitolina came back after the rain break to drop the second set but rolled off the first three games in the third, before being broken when serving for the match at 5-2 in the third set.
Azarenka saved match point and took the next game for love, rolling off five in a row to set up a meeting former French Open winner Garbine Muguruza or Danielle Collins for a place in the third round.
Collins advanced past former world number one Caroline Wozniacki who retired with a lower leg injury, after losing the first set 7-6 (7/5).
Czech fourth seed Karolína Plisková eased through to the third round along with Australian Ashleigh Barty, the eighth seed.
- Zverev horror show -
In the men's competition, world number five Zverev, the 2017 winner and runner-up to Novak Djokovic last year in Rome, extended his terrible clay-court run, falling 7-5, 7-5 to Italian wild card Matteo Berrettini in the second round.
"The match that I played was horrendous," said Zverev, who has won just four matches on clay this season, including a run to the quarter-final of the Madrid Open where he was the defending champion.
"I've lost my voice screaming, I'm overjoyed. This is a victory that charges me," said 33rd-ranked Berrettini.
Belgian David Goffin rallied from a set down to beat former French Open champion Stan Wawrinka 4-6, 6-0, 6-2 to set up a meeting with Argentine seventh seed Juan Martin Del Potro for a place in the third round.
Ninth seed Marin Cilic beat Italian wild card Andrea Basso 6-1, 7-5 as Australian Nick Kyrgios struck 15 aces and 41 winners to get past Russian 12th seed Daniil Medvedev 6-3, 4-6, 6-3.
"I knew it was going to be tough today because I haven't played much on clay," said Kyrios, who next plays Norwegian qualifier Casper Ruud.
Portgual's Joao Sousa saved four match points in the deciding set to battle past American Frances Tiafoe 6-3, 6-7 (3/7), 7-6 (7/4).
Sousa, who also trailed 1/4 in the deciding set tie-break, will play third seed Roger Federer in the second round.
Eight-time Rome winner Rafael Nadal will start his tournament against Jeremy Chardy on Wednesday, after the Frenchman beat compatriot Richard Gasquet 6-1, 4-6, 6-3 in a match suspended overnight on Monday.