Daniele Hantuchova also set up a meeting with the world's second-ranked player and 42-year-old Kimiko Date-Krumm survived as well.
Townsend, 16, was given a wild card berth in this high-profile tournament and she took advantage of it to defeat Lucie Hradecka 3-6, 7-6 (7-1), 6-3. Townsend finished 2012 as the No. 1 ranked female junior player in the world.
Her next opponent will be No. 11 seed Ana Ivanovic, who like all seeded players was awarded a bye into the second round.
Azarenka is ranked second in the world behind Serena Williams, but is seeded No. 1 in this tournament due to the absence of Williams from the event.
Date-Krumm was a 6-4, 3-6, 6-4 winner over Galina Voskoboeva and will now play Elena Vesnina, the 29th seed.
Swim Week Miami Beach 2014 [PHOTOS]