Stephens rallied to beat the world No. 3 from Russia 2-6, 7-6 (7/5), 6-3, bringing Sharapova’s injury return to an abrupt end in this combined WTA and ATP Masters hardcourt tournament.
While Sharapova—who enjoyed a first-round bye—was struggling with her game, Roger Federer made a smoother comeback after dealing with back pain in recent weeks.
The five-time champion who is defending the title and needs as many matches as possible before the August 26 start of the US Open, won his seventh career match against German friend Philipp Kohlschreiber 6-3, 7-6 (9/7).
The fifth-ranked Swiss felt in his element as he played the tournament for the 13th time, improving his record to 31-10 this season.
“I think it was a match where I had to sort of just fight to come through and hope to get over the finish line,” Federer said. “I was playing really well at times, and then sometimes it was maybe a bit up and down.
“Assessing the performance overall, I’m very happy. It’s good to be back and playing pain free. I don’t know, my mind’s good. I was in a good place while I was playing, so it felt nice to win at the end.”
Spanish third seed David Ferrer joined Federer in the third round with a 7-6 (7/5), 3-6, 6-4 victory over American Ryan Harrison.
Montreal finalist Milos Raonic struggled in the opening set against Jack Sock, but found his rhythm for a 3-6, 6-4, 6-3 win and a date on Wednesday with Janko Tipsarevic.
Sharapova was making her return to tennis seven weeks after her last match, a shock second-round Wimbledon defeat.
Since then she had sacked her coach and begun working with Jimmy Connors, all while she battled to get over a hip injury.