Williams fell 6-3, 6-2 to the Indian Wells champion at the stadium on Key Biscayne. The match lasted about 77 minutes. Williams had five double faults and saved four of eight break points against Osaka.
She exited the match after overhitting a shot past the baseline. Williams did not do a post match news conference.
Osaka and Williams were both unseeded for the tournament. Williams entered the match at No. 491 in the WTA Rankings, while the 20-year-old Osaka sits at No. 22. Williams is an eight-time champion at the Miami Open, which moves to the Miami Dolphins' Hard Rock Stadium in 2019.
"I was extremely nervous coming onto the court. I don't know if anybody knows this, but Serena is my favorite player," Osaka said in her on-court interview after the match. "So just playing against her is kinda like a dream for me. So I'm very grateful that I was able to play her and it's even better that I was able to win."
Osaka faces Elina Svitolina in the second round at 11 a.m. on Friday in a round of 64 matchup. Svitolina is at No. 4 in the world rankings. Osaka's win at Indian Wells was her first career singles title.