In another marquee women's matchup, Kim Clijsters rallied to beat Justine Henin 2-6, 6-2, 6-3 in an all-Belgian duel between former No. 1-ranked players making Wimbledon comebacks after returning from retirement.
Five-time women's winner Venus Williams also advanced.
Serena Williams served 19 aces for the second straight match -- taking her total to 63 for the tournament -- and held off the resurgent Sharapova in a tight battle on Centre Court.
"I don't serve like this too often," Williams said. "I don't know what it is about this court that makes me serve well."
Williams, who hit four aces in the opening game, saved three set points in the tiebreaker to stay in command.
"I played really well and I thought I had my chances," said Sharapova, who hurt her own cause with seven double faults. "If it was not for her really great serving, I certainly had a real good look at winning the match."
In 2004, Sharapova -- 17 years old at the time -- stunned Williams 6-1, 6-4 for her first Grand Slam title.
"That was so long ago that I don't think it gives me any more added or any less satisfaction," Williams said after Monday's match. "We're both different players. She's obviously improved. Hopefully I've improved since six years ago."
Sharapova came back from 3-1 down in the first set and had Williams on the ropes in the tiebreaker, but failed to convert. Leading 6-4, she hit a forehand into the net before Williams smacked a forehand winner to make it 6-6.
With Sharapova up 8-7, Williams hit a service winner to save another set point. At 9-all, Sharapova double-faulted. Williams then converted her third set point with her 13th ace.
Serving for the match in the second set, Williams hit another ace and a service winner. She finished with 31 winners and 17 errors, while Sharapova had 14 winners and 18 errors.
"I had a few looks at her serve, but even when you had a good look and the ball's coming at you in 120s [mph], it's pretty tough to do much with it," Sharapova said.
Clijsters came from a set down against Henin and is now 13-12 in career meetings against her compatriot.
Henin received treatment on her right elbow on three changeovers after slipping and falling to the turf as she charged to the net at 2-1 in the first set. She said the elbow was "quite painful" and bothered her on her serves and backhands, but didn't know the extent of the problem.
"I don't really know how it affected [the match]," said Henin, who has seven Grand Slam titles but has yet to win Wimbledon. "We'll see in the next few days."
Henin seemed in complete command after easily winning the first set, but Clijsters -- a two-time U.S. Open champion -- lifted her game in the second.
Clijsters made the decisive break in the eighth game of the final set after Henin sailed a forehand long, then served out the match. The two exchanged kisses on the cheek at the net.
"I can't believe we're back to this after so many years of battling against each other," Clijsters said. "I think this was our 25th battle, so we go way back but we play really good tennis and I think we showed some good stuff out there today."
Venus Williams overcame a tough challenge from the lowest-ranked player left in the draw. The second-seeded Williams broke back twice to stay in the second set, then escaped in the tiebreaker to complete a 6-4, 7-6 (5) victory on Court 2 over 92nd-ranked Jarmila Groth of Australia.
"There wasn't a lot of room for error for either one of us against each other's serve," Williams said. "She played really well today. I didn't think she made too many errors. Just really played some smart tennis and took advantage of opportunities. I played well at the end to close it out."
The victory sent Williams into her 31st Grand Slam quarterfinal and improved her record to 12-0 in fourth-round matches at the All England Club. She could potentially face Serena in Saturday's final.
Vera Zvonareva advanced when fourth-seeded Jelena Jankovic retired with a back injury while trailing 6-1, 3-0. It's the fourth time the Serb has gone out in the fourth round here, while the Russian made it to the quarters for the first time. She will next face Clijsters.
Third-seeded Caroline Wozniacki lost 6-2, 6-0 in just 46 minutes to unseeded Czech Petra Kvitova. The 19-year-old Dane, last year's U.S. Open runner-up, was overwhelmed by the 62nd-ranked Kvitova, managing just four winners to her opponent's 23.
Information from The Associated Press was used in this report.