Williams, a three-time champion seeded No. 29, has won 54 matches on the island. She considers the tournament her home event, because she lives an hour away in Palm Beach Gardens.
Her latest victory took 2½ hours.
"I love being here," she said. "I wanted to play Monday."
Williams' next opponent will be No. 10 Dominika Cibulkova, who beat No. 22 Alize Cornet 7-6 (6), 6-1. No. 11 Caroline Wozniacki lost only five points in the second set and beat No. 17 Sloane Stephens 6-1, 6-0.
Li Na overcame three set points to overtake American Madison Keys 7-6 (3), 6-3. The No. 2-seeded Li, the reigning Australian Open champion, won even though she had seven double-faults and was broken four times.
Keys failed to convert her set points serving at 5-3 in the first set. She also squandered a lead in the second set, when three times she was within a point of going up 3-love against Li.
"She's No. 2 in the world for a reason," Keys said. "She just won Australian Open for a reason. She's a great player. I played well at times, and she just played the bigger points really, really well."
Information from The Associated Press was used in this report.