In-form Muguruza, ranked No.6 in the world, was coming off the back of a victory in Chicago, but couldn't deal with the Australian in the first set, surrendering it 6-3 to Tomljanovic.
But the Spaniard dominated in the second set, allowing Tomljanovic just a single game, but the resurgence wouldn't last. The 28-year-old Aussie got on top again in the decider to close it out 6-3 1-6-3 6-3 in one hour and 53 minutes.
🇦🇺🎾 WHAT A WIN!! Australia's @Ajlatom has caused an upset at #BNPPO21, defeating No.5 seed @GarbiMuguruza to seal a place in Round 3 at Indian Wells 👏🏻👏🏻👏🏻 | Watch LIVE via @kayosports, @Foxtel, Fetch and beIN SPORTS CONNECT!! ▶️ https://t.co/dR3JmGUdy7 pic.twitter.com/wY1RozEwue— beIN SPORTS (@beINSPORTS_AUS) October 9, 2021
The victory was Tomljanovic's first in four meetings against world No.6 Muguruza, who is ranked 41 places higher than the Australian, who had only beaten her once before until this clash.
"I was really looking forward to playing Garbine, because I did lose the last couple of times, but I did try to focus on that one time I beat her so I was really happy that I got through today," Tomljanovic said in her on-court interview.
The victory represents Tomljanovic's best result in nine visits to Indian Wells. It was also her fourth win over a top 10 player on the WTA Tour, her first for 2021.
No.1 seed Karolina Pliskova also won through to the third round, beating Poland’s Magdalena Frech 7-5, 6-2.
The Czech's serve was almost unplayable as she sent down six aces and claimed 79 per cent of her first serve points.
Pliskova, who was runner-up to Australia's Ash Barty at Wimbledon this year, has advanced to at least the last eight at Indian Wells in her past four visits, and was a semi-finalist in 2016 and 2017.
Other winners on Sunday (AEDT) included Ons Jabeur, Anna Kalinskaya and Tamara Zidansek.