Williams lost 6-4 6-3 to Svitolina, ranked 20th in the world.
The world number one's struggles were highlighted by five double faults in the seventh game of the second set.
"It didn't work out the way I wanted it to but at least I was able to make it to Rio, that was one of my goals," Williams said.
"The better player today won but I know next time is going to be a really good match and I look forward to it."
Williams and sister Venus were knocked out of the women's doubles on Sunday when they lost to Czech Republic pair Lucie Safarova and Barbora Strycova.
Svitolina, who will face Czech Republic's Petra Kvitova in the quarter-finals, said: "It's an unreal feeling for me. This is just a perfect moment."
Find out how to get into tennis in our special guide.
Williams follows men's top seed Novak Djokovic in exiting the Olympics after he was defeated in both the men's singles and doubles.
The 34-year-old's exit means Angelique Kerber and Madison Keys are the only top-eight seeds remaining of what had appeared a very strong field.
Kerber faces Britain's Johanna Konta in the quarter-finals after both won their matches earlier in the day.
Defending champion Serena Williams is out of the Olympics after losing to Ukrainian Elina Svitolina in the women's singles third round.