Sharapova lost her opening round match at the Qatar Open on Monday to Romania's Monica Niculescu in three sets and is currently ranked 41 in the world.
The 30-year-old Russian has a 21-10 win-loss record since her return from a doping ban last April.
American world number 14 Keys, who was expected to make her Dubai debut, has withdrawn due to illness.
"Unfortunately both Maria Sharapova and Madison Keys have regretfully had to withdraw from the Dubai Duty Free Tennis Championships due to injury and illness," tournament director Salah Tahlak said in a statement.
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.
"We are sorry that neither Maria nor Madison will be able to play in Dubai, but we still have one of the strongest fields ever assembled for the WTA event.
"Maria said that she is very sorry she cannot be here and hopes to come back next year. We wish her and Madison a speedy recovery."
The tournament begins on Monday with world number two Simona Halep set to lead the field alongside defending champion Elina Svitolina.
(Reporting by Hardik Vyas in Bengaluru; Editing by Toby Davis)
