Williams looked set to cruise through as she took the first set in emphatic fashion, but Kazakh wildcard Shvedova has been in superb form, winning all 24 points and dropping none in a Golden Set against Sara Errani in the previous round, and she hit back impressively to force Williams to a final set.
Williams, also taken to three sets by Zheng Jie in the previous round, showed why she is a 13-time Grand Slam champion as she finally subdued her gritty opponent to win 6-1, 2-6, 7-5 and set up a last eight clash with defending champion Petra Kvitova or former French Open winner Francesca Schiavone.
"Drama again! I love the drama," Williams said. "I knew the whole time I could play better, but I feel fine. I'm not tired."
She added: "I feel it's going good. The bottom line is I can play so much better than I am. If I couldn't do better that would be a problem. You know me, I'm never satisfied."
Williams hasn't won a Grand Slam since her fourth Wimbledon triumph in 2010 and her first round exit from the French Open against Virginie Razzano last month ranked as her worst ever result at a major.
But she clearly still has the appetite for more success, even if she might need to up her game to pass the even sterner tests that lie ahead.
Once again Williams was scheduled out on Court Two while several players who have won far less than her 13 Grand Slams enjoyed the more glamorous confines of Centre Court and Court One.
Williams has never hidden her unhappiness about her frequent trips to Wimbledon's shadowlands and the sixth seed started as if determined to spend as little time as possible on the court.
Shvedova completed the first Golden Set in Grand Slam history on Saturday, but a repeat was never on the cards against Williams, and she quickly stamped her authority on the match in blustery conditions, taking the first game with two aces before immediately breaking Shvedova.
Shvedova, the Wimbledon doubles champion in 2010, hadn't dropped a set en route to reaching the last 16 for the first time.
That run was over within 26 minutes as Serena kept up her brutal assault from the baseline, breaking again for a 4-0 lead before serving out the set.
Yet Serena found it much harder to stay on top in a second set which saw a complete change of momentum as Shvedova unleashed some fiery groundstrokes of her own.
It seemed to unnerve Williams, who earned a code violation for racquet abuse after another accurate shot from the Kazakh put her under pressure again.
Shvedova began to match Williams's power and a pair of breaks levelled the match at one set all.
But Williams showed her big-match experience to land the decisive break late in the final set. – AFP