The top-ranked Williams overcame six double-faults and rallied in the second set from a 5-2 deficit. She hit six winners in the tiebreaker, including a forehand passing shot cross-court on the final point.

Williams, who won her most recent Key Biscayne title in 2008, improved to 59-7 in the tournament. Steffi Graf, another five-time champion, went 59-6.

"I hope to get more," Williams said.

No. 2 Andy Murray, the champion in 2009 and runner-up last year, returned to the quarterfinals by beating No. 16 Andreas Seppi 6-2, 6-4. No. 8 Richard Gasquet hit 17 aces, including three in the final tiebreaker, and advanced to his first Key Biscayne quarterfinal by beating No. 10 Nicolas Almagro 6-7 (3), 7-5, 7-6 (3).

Sam Querrey lost his fourth-round match, and for the first time the tournament will have no American in the men's quarterfinals.

Querrey, playing his first tournament as the top-ranked American on the ATP Tour, lost to Tomas Berdych 6-1, 6-1 in 50 minutes.

On a breezy, sun-splashed afternoon, Williams and Li both struggled with their second serve.

"It was like, 'Look, I just can't hit any more double-faults,"' Williams said. "It's embarrassing and unprofessional. I hit about 50 in one game, and it was just outrageous."

Li had seven double-faults, with three giving Williams her only break points.

In the tiebreaker, Williams didn't need a second serve. She hit consecutive service winners for a 4-3 lead, then two more to go up 6-5.

When Williams smacked a winner on match point she jumped for joy cannonball-style, knees high and fist raised.

"I don't usually leap like that in the quarterfinal," she said. "But it was just a good shot."

Williams, who is assured of remaining No. 1 next week, will play Thursday against the winner of the quarterfinal Tuesday night between defending champion Agnieszka Radwanska and No. 30-seeded Kirsten Flipkens.