Russian second seed Sharapova, who has yet to play since a semi-final defeat at Wimbledon last month, cited a leg injury for her exit.
"It's a tough decision to make but I think it's the right decision to be ready for the U.S. Open," Sharapova told reporters.
"It's not ideal preparation for New York, but that's the circumstance and I obviously want to give myself the best chance to be healthy there. That's the wisest move right now."
US Open
'The younger generation has taken over' - Becker hails 'Dame Emma Raducanu'
Williams was forced to pull out due to a viral illness, something that had bothered her in Monday's victory over Zarina Diyas, denying fans an attractive second round encounter between the American and former number one Ana Ivanovic.
"(It would) have been a tough match for both of us," Serbia's Ivanovic tweeted. "I hope she can get well fast."
The U.S. Open begins on August 31, and is live on British Eurosport.
On the court, Swiss prospect Belinda Bencic continued her brilliant run of form with a 7-5 6-3 first-round victory over Germany's Angelique Kerber.
Bencic, who shocked world number one Serena Williams in the semi-finals of last week's Rogers Cup before going on to clinch the title, fended off attempted comebacks by the 11th-seeded Kerber in both sets before sealing victory in 90 minutes.
Though Kerber clawed back from 5-1 down in the opening set and 3-1 in the second, she ultimately paid the price for a whopping 48 unforced errors and seven double faults.
"The first set was a very difficult situation," said the 18-year-old Bencic, who converted six of her seven break point opportunities during the match. "I had 5-1 and I was playing great but then she played better and better and started going for her shots more until it was 5-5 again.
"But then I was able to focus again and won my service game, and then I closed it out."
Bencic, who is ranked 12th in the world, said she had gained a massive jolt of confidence last week after a dream run to her second WTA title that also featured wins over Eugenie Bouchard, Caroline Wozniacki, Ivanovic and Simona Halep in the final.
Bencic will next face Italy's Flavia Pennetta, who beat Dominika Cibulkova of Slovakia 7-5 6-2 in the opening round.
In other matches, 10th-seeded Spaniard Carla Suarez Navarro was ousted 6-1 6-2 by American Sloane Stephens, while former world number one Victoria Azarenka of Belarus trounced American Lauren Davis by the same scoreline.
WTA Cincinnati results
Round 2
6-Ana Ivanovic (Serbia) beat Venus Williams (U.S.) walkover
Round 1
Eugenie Bouchard (Canada) beat Kateryna Bondarenko (Ukraine) 7-6(2) 7-6(5)
Caroline Garcia (France) beat Sabine Lisicki (Germany) 3-6 6-3 6-4
Belinda Bencic (Switzerland) beat 11-Angelique Kerber (Germany) 7-5 6-3
Camila Giorgi (Italy) beat Christina McHale (U.S.) 5-7 6-3 6-2
Victoria Azarenka (Belarus) beat Lauren Davis (U.S.) 6-1 6-2
Anastasia Pavlyuchenkova (Russia) beat Roberta Vinci (Italy) 6-3 0-6 6-2
Daria Gavrilova (Russia) beat 16-Sara Errani (Italy) 6-1 4-6 6-2
Flavia Pennetta (Italy) beat Dominika Cibulkova (Slovakia) 7-5 6-2
Sloane Stephens (U.S.) beat 10-Carla Suarez Navarro (Spain) 6-1 6-2
Kristina Mladenovic (France) beat Daniela Hantuchova (Slovakia) 6-2 6-1
Anna Karolina Schmiedlova (Slovakia) beat 13-Agnieszka Radwanska (Poland) 4-6 6-3 6-1
Mona Barthel (Germany) beat Casey Dellacqua (Australia) 2-6 6-3 7-6(4)
US Open
Tennis stars fill red carpet at Met Gala as Raducanu celebrates US Open title
14/09/2021 AT 09:45
Laver Cup, Indian Wells, ATP & WTA Finals: What's left of the 2021 tennis season?
13/09/2021 AT 22:24