"It was an incredibly tough first set,'' Williams said. "I just needed to relax and yet keep up the intensity.''
The top-ranked Williams seeks a record seventh Key Biscayne title, and her second in a row.
No. 4-seeded Maria Sharapova, a five-time runner-up in the tournament, joined Williams in the third round by beating Kurumi Nara 6-3, 6-4. Seeded players had first-round byes.
In men's play, former world No. 1 Lleyton Hewitt became the third active man to win 600 matches when he rallied past Robin Haase of the Netherlands 3-6, 6-3, 6-3.
Fellow Australian Bernard Tomic lasted only 28 minutes in the shortest match since the ATP started keeping such records in 1991, losing to Jarkko Nieminen 6-0, 6-1.
Tomic, who won just 13 points, is mounting a comeback from surgery on both hips and was playing for the first time since January.
"I did the best as I could,'' he said. ``Hopefully in a little bit of time I can get back to 100 percent.''
Williams, who owns a small share of the NFL's Miami Dolphins, wore a dress in the team's orange and turquoise colors _ which may explain her slow start. Or maybe it was because she hadn't played since Feb. 21.
Williams had to erase a 5-3 deficit in the first set, and then fell behind 6-3 in the tiebreaker. Shvedova pushed a forehand into the net, then the Kazakh hit a nervous double-fault that allowed Williams to exhale.
She won the next two points with aces, then closed out the set with a backhand winner, a fist pump and a scream of "Yes!''
Her game steadied in the second set, when she had 18 winners and only 10 unforced errors _ bad news perhaps for opponents to come in the tournament Williams considers her hometown event. She lives an hour north in Palm Beach Gardens.
"I love playing here,'' she told the crowd.
The 33-year-old Hewitt also staged a comeback. With the victory, he joined Roger Federer (942 wins) and Rafael Nadal (675) in reaching the 600 match milestone.
"Not many people get the opportunity to get close to that, so it means I have been around for an awfully long time,'' Hewitt said. ``I'm getting old. A few years ago when I had the last couple of surgeries, I probably would have doubted I'd get to this stage. I'm grateful I'm out there and able to compete with the best guys.''
In other women's play, No. 5-seeded Angelique Kerber of Germany won her opening match, beating Peng Shuai of China 6-3, 1-6, 7-6 (5). Kerber, a two-time Grand Slam semifinalist, matched her best showing at Key Biscayne by reaching the third round.
Ana Ivanovic beat American Lauren Davis 6-1, 6-1, and No. 8 Petra Kvitova defeated Argentina's Paula Ormaechea 6-3, 6-4. Svetlana Kuznetsova, the 2006 champion, lost to Croatian qualifier Donna Vekic 7-6 (5), 7-5.
Friday's stadium court schedule features the winners of 34 Grand Slam titles in five matches. The parade of champions will include Federer, Novak Djokovic, Venus Williams, Andy Murray and Li Na playing their opening matches.
Live: BSE Sensex