World number 10 Raonic, whose biggest career title came on the same Washington hardcourts in 2014, advanced to a third-round match.
World number 10 Raonic, whose biggest career title came on the same Washington hardcourts in 2014, advanced to a third-round match against either US 16th seed Ryan Harrison or Cypriot Marcus Baghdatis, who meet in a later match.
Raonic is mired in an 18-month ATP title drought since capturing his most recent crown last year at Brisbane, a run of 29 events.
The 26-year-old Montenegro-born serve smasher has lost five finals since then, including last year's championship match at Wimbledon.
"This is a chance to really get things going the right way," Raonic said. "It's the leadoff to having a chance to turn things around. This year, I haven't had that good a season."
Raonic was nagged by a right leg injury that forced him to withdraw from three events and surrender walkovers in two others, including the Delray Beach Open final against American Jack Sock.
"Until the recent weeks, my mind hasn't been on tennis as much," Raonic said, citing the injury and trying to play his best while not back in prime shape.
"Now is the first time I've had time to put all the pieces together and focus on my game."
Mahut, the oldest man in the draw at 35, saved two match points in the tie-breaker then forced Raonic to save a set point. But Mahut swatted a backhand crosscourt volley wide and Raonic followed with a service winner to end matters after one hour 56 minutes.
The first major upset on the men's side came when 225th-ranked American Tommy Paul ousted French seventh seed Lucas Pouille 7-6 (8/6), 6-3.
Pouille, ranked 17th, had won titles this year at Budapest and Stuttgart and risen as high as 13th in the world.
Paul advanced to a third-round matchup against 11th seed Gilles Muller of Luxembourg, who ousted Russia's Dmitry Tursunov 6-1, 6-2.
In later men's matches, fifth seed Alexander Zverev, a 20-year-old German seeking his fourth title of the year, faced Australia's 75th-ranked Jordan Thompson. Wins this season at Monpellier, Munich and Rome helped lift Zverev to a career-best eighth in this week's rankings.
And defending champion Gael Monfils, the sixth seed from France, faces Indian qualifier Yuki Bhambri.
On the women's side, 2014 Wimbledon runner-up Eugenie Bouchard of Canada upset US eighth seed Christina McHale 7-6 (8/6), 6-0 and French second seed Kristina Mladenovic outlasted Germany's Tatjana Maria 7-5, 3-6, 6-3.
Mladenovic, who won her only title in seven WTA finals appearances last February at St. Petersburg, could meet Bouchard in the quarter-finals.
"Nothing has changed for me," Mladenovic said. "I'm just working on elevating my game and playing hard."