Britain's Laura Robson joined Azarenka on her way out of Florida after losing to Alize Cornet, the French 32nd seed in a rain-affected match.
Azarenka withdrew from her opening match because of an ankle injury she suffered playing at Indian Wells last week.
"I'm very disappointed ... But I have to take my health into consideration," said Azarenka, who won the Australian Open in January but has struggled with injuries since.
"I tried everything I could but couldn't make it. It's an unfortunate part of our job."
Azarenka's withdrawal proved an unexpected bonus for American teenager Lauren Davis, who failed to qualify for the tournament.
She was given a 'lucky loser' pass into the event when Azarenka pulled out then saved three match points in defeating Madison Keys 6-1 5-7 7-6.
"I just hoped and I wished and I prayed that I would get in," said Davis. "I was just so happy. I didn't care if I won or lost. I just was so grateful for the opportunity to play."
Sharapova romped to a 6-2 6-0 win over Canada's Eugenie Bouchard, winning 11 games in a row.
"It's always tough transitioning to the first match of a new tournament, especially after the great week I had in Palm Springs," Sharapova said.
"Everything's different - the stadium is different, the weather's different - so obviously I'm happy I was able to play well in my first match tonight."
Next for Sharapova is 29th seed and fellow Russian Elena Vesnina.
Robson, ranked a career-high of 43 in the world despite a 2013 win-loss record of 4-6 prior to her match against Cornet, dropped to a 5-7 7-5 6-1 defeat.
Rain stopped play with the scores at 2-2 in the second set and when play resumed, it was Cornet who edged the stanza.
Robson, who won her first match since reaching the Australian Open third round in January in overcoming Camila Giorgi in the opening round in Florida, fell apart in the decider as the Frenchwoman breezed to victory.
Sixth seed Angelique Kerber reached the third round with a 6-7(5) 6-3 6-2 win over Francesca Schiavone.
Having edged a tight first-set tiebreak, the veteran Italian then struggled on serve - with the German left-hander having little trouble in coasting through.
She will next play 28th seed Sorana Cirstea after the Romanian beat Silvia Soler Espinosa of Spain 2-6 7-5 6-2.
Italian 15th seed Roberta Vinci lost an opening tie-breaker to American Christina McHale 7-2 but won the last two sets to win through 6-7(2) 6-1 6-3 in over two-and-a-half hours.
The 30-year-old three-times Grand Slam doubles champion will face Spain’s Carla Suarez Navarro in the third round after the 20th seed beat Jamie Hampton of the USA in another three-setter.
Suarez Navarro was broken late in the first set but did likewise in the second before taking a final-set tie-break 7-3, triumphing 5-7 7-5 7-6(3) in two hours and 43 minutes.
Svetlana Kuznetsova won an all-Russian clash by ousting 18th seed Ekaterina Makarova 6-4 6-4 to set up a third-round match with Ana Ivanovic, who beat Urszula Radwanska 6-2 6-1.
Fourteenth seed Maria Kirilenko continued her good recent form with a 6-1 6-4 win over Bethanie Mattek-Sands while Jelena Jankovic, the 22nd seed, progressed 6-3 7-5 past Victoria Duval.
WTA Miami second-round results:
8-Sara Errani (Italy) beat Daniela Hantuchova (Slovakia) 6-3 6-1
22-Jelena Jankovic (Serbia) beat Victoria Duval (U.S.) 6-3 7-5
12-Ana Ivanovic (Serbia) beat Urszula Radwanska (Poland) 6-2 6-1
32-Alize Cornet (France) beat Laura Robson (Britain) 5-7 7-5 6-1
3-Maria Sharapova (Russia) beat Eugenie Bouchard (Canada) 6-2 6-0
14-Maria Kirilenko (Russia) beat Bethanie Mattek-Sands (U.S.) 6-1 6-4
Simona Halep (Romania) beat 26-Tamira Paszek (Austria) 6-1 6-7(4) 7-5
11-Nadia Petrova (Russia) beat Zheng Jie (China) 6-3 6-1
28-Sorana Cirstea (Romania) beat Silvia Soler Espinosa (Spain) 2-6 7-5 6-2
6-Angelique Kerber (Germany) beat Francesca Schiavone (Italy) 6-7(5) 6-3 6-2
21-Klara Zakopalova (Czech Republic) beat Anabel Medina Garrigues (Spain) 6-3 7-6(3)
20-Carla Suarez Navarro (Spain) beat Jamie Hampton (U.S.) 5-7 7-5 7-6(3)
Lauren Davis (U.S.) beat Madison Keys (U.S.) 6-1 5-7 7-6(7)
15-Roberta Vinci (Italy) beat Christina Mchale (U.S.) 6-7(2) 6-1 6-3
Svetlana Kuznetsova (Russia) beat 18-Ekaterina Makarova (Russia) 6-4 6-4
29-Elena Vesnina (Russia) beat Donna Vekic (Croatia) 6-4 6-2