"You can see how my linemates and my whole team played tonight; every time they had a chance to find me out there, they tried to do it," Ovechkin said. "Obviously, I had plenty of chances today to score more, but I'll take two and move forward."
The Capitals forward tied Messier with his 694th NHL goal when he shot on a 2-on-1 at 10:27 of the second period for a 3-1 lead and passed him with his 695th goal into an empty net with 15 seconds remaining in the third period for the 5-3 final.
[WATCH: All Capitals vs. Senators highlights]
"There was a day where we couldn't put him on the ice 5-on-6 or when the other team's pulled the goalie," Capitals coach Todd Reirden said. "And now he's become really dependable in that situation, trustworthy and makes a strong play. ... He was definitely shooting tonight and feeling it, and I thought their goaltender made some good saves on him."
Ilya Samsonov made 25 saves to win his 11th straight decision for Washington (35-12-5), which won for the eighth time in its past 11 games.
"I don't think we played great or anything like that," Capitals forward Carl Hagelin said. "But we got the two points and that's what we wanted. But we need to step it up next game, I think we've got a lot better."
Video: WSH@OTT: Ovechkin scores, ties Messier on goals list
Thomas Chabot had a goal and an assist for Ottawa (18-24-9), which lost in regulation for the first time in four games.
"We showed some resiliency, for sure," Senators coach D.J. Smith said. "We played hard, we didn't lay down. I thought we hung [goalie Marcus Hogberg] out in the first period. In saying that, they're a really good team. They make plays. There's a reason they're one of the best teams in the League."
T.J. Oshie redirected a slap pass from John Carlson to give the Capitals a 1-0 lead at 4:10 of the first period. With his 362nd NHL assist, Carlson passed Calle Johansson for most by a defenseman in Capitals history.
Evgeny Kuznetsov one-timed a cross-crease pass from Jakub Vrana to make it 2-0 at 11:22.
Video: WSH@OTT: Vrana sets up Kuznetsov down low
Chris Tierney tapped in a centering pass from Dylan DeMelo on a shorthanded rush to get Ottawa within 2-1 at 7:15 of the second period. It was the Senators' NHL-best 12th shorthanded goal.
Chabot scored with a wrist shot from the top of the slot to make it 3-2 at 11:31.
"There's some positives to take out of that [game]," Chabot said. "Obviously, there's still a couple of things that we wish we [could do] all over again, but it's part of the game, and I think we found a way to battle all that game."
Hagelin scored on a shorthanded breakaway to make it 4-2 at 3:07 of the third period. Artem Anisimov scored on the power play to make it 4-3 at 4:47.
"Good resilience by us tonight," Tierney said. "We didn't start well and we just kept chasing the lead all night. That's what happens when you give a good team a lead. But I like the way we stuck with it, clawed our way back and took it to within one goal a couple times."
Ovechkin had his season-high with 11 shots. He has 37 goals, tied for the NHL lead with Boston Bruins forward David Pastrnak.
"He was on, he was sharp, he was ready to go," Reirden said. "He stepped away from the All-Star Game to prepare himself to make a run the second half here and get himself ready to push our team to the ultimate goal for our group, which is a Stanley Cup."
Video: WSH@OTT: Hagelin goes top shelf for shorthanded goal
Ovechkin is five goals from becoming the eighth player in NHL history to score 700. He has 11 in his past five games.
"It's nice to be in that company," Ovechkin said. "Obviously, lots of legends up there."
They said it
"It's cool when we're in different buildings and to see other fans cherishing that moment; it's a big part of history, and I think he deserves the cheering and the applause for what a great career he's had so far." -- Capitals defenseman John Carlson on Alex Ovechkin
"I'd say probably the save I like best is, the first period he has one shot on net until we give up a breakaway, and then he has to make that save. He's cold in the net, he hasn't played in two weeks, and that's the save he makes? That's the type of stuff, to me, that is really the surprising part of Ilya's game, and it's a great compliment for a young goaltender to do that." -- Capitals coach Todd Reirden on Ilya Samsonov
"He's the best goal-scorer for a reason: He shoots. If you want to score goals, you've got to shoot, and he shoots from everywhere. The guys that play with him know that and they get him the puck and he continues to shoot and eventually they go in." -- Senators coach D.J. Smith on Alex Ovechkin
Need to know
The Senators were 1-for-3 and are 6-for-10 on the power play in their past four games. ... Ovechkin had never scored 10 goals in any five-game span in his NHL career. ... Wayne Gretzky (894), Gordie Howe (801), Jaromir Jagr (766), Brett Hull (741), Marcel Dionne (731), Phil Esposito (717) and Mike Gartner (708) are the players who have scored 700 NHL goals. ... Johansson played for Washington from 1989-2003.
Capitals: Host the Pittsburgh Penguins on Sunday. (12:30 p.m. ET; NBC, NHL.TV)
Senators: At the Toronto Maple Leafs on Saturday. (7 p.m. ET; CBC, SN1, SNE, SNO, SNP, TVAS, NHL.TV)
Video: Ovechkin climbs up goals list in Capitals' 5-3 win