Top-ranked Osaka, the reigning U.S. Open and Australian Open champion, hit 43 winners, including eight aces, on the outdoor red clay to beat 2016 finalist Dominika Cibulkova 6-2, 7-6 (6).
“For me, I’m just happy to get through it,” Osaka said. “I feel the most nervous during the first round and to play against Cibulkova was kind of tough for me, especially on clay.”
Osaka will face Sara Sorribes in the second round after she got past fellow Spanish wild card Lara Arruabarrena.
A lower back injury forced Wozniacki to retire from her match with Alize Cornet when she was losing 0-3 in the first set.
Martic ousted two-time grand slam winner Muguruza 7-5, 7-6 (2), a week after the Croat won her first career title in Istanbul.
Martic will next face fourth-seeded Angelique Kerber, who broke Lesia Tsurenko six times to earn a 6-3, 6-2 victory.
Third-seeded Simona Halep, who has won twice in Madrid, brushed off Russian qualifier Margarita Gasparyan 6-0, 6-4.
Fifth-seeded Karolina Pliskova had to fight back from a set down to fend off 18-year-old Ukrainian Dayana Yastremska 5-7, 7-6 (5), 6-3.
Sloane Stephens and Victoria Azarenka also advanced, while Madison Keys lost to Sorana Cirstea in three sets.
On the men’s side, Rafael Nadal knows who his first opponent will be after Felix Auger-Aliassime beat fellow Canadian Denis Shapovalov, a semifinalist last year, 6-2, 7-6 (7).
The 18-year-old Auger-Aliassime has reached the final in Rio and the semifinals in Miami already this year.
Jan-Lennard Struff beat Nick Kyrgios 7-6 (4), 6-4 in a match that saw a combined 21 aces.