David Pastrnak had two goals and Patrice Bergeron also scored for the Bruins, who cashed in on a late opportunity when Washington's Nic Dowd was called for throwing his stick with just 2:34 left in the third. Jake DeBrusk set up McAvoy for a wrist shot from the slot that gave the Bruins the lead for good after Washington rallied from deficits of 2-1 and 3-2.
Erik Haula had two assists for Boston, and Linus Ullmark stopped 14 shots.
Evgeny Kuznetsov, Lars Eller and Nicklas Backstrom scored for Washington. Alex Ovechkin assisted on Kuznetsov's goal, extending his point streak to six straight games. Vitek Vanecek stopped 29 shots for the Capitals.
Bergeron was credited with a goal 9:41 into the third period after the puck hit off Kuznetsov in front of the crease and got through Vanecek's pads, barely trickling over the goal line. There was no initial call and Bruins fans screamed until there was a stoppage for a video review, which confirmed the puck crossed the line.
Backstrom tied it again 36 seconds later with a wrist shot.
Kuznetsov beat Ullmark with a high wrist shot from the left circle 4:07 into the game. It was the first of just five shots the Capitals got on goal in the first period. Pastrnak answered for Boston 50 seconds later after dropping a pass back for Taylor Hall at the blue line for a quick pass right back to Pastrnak in the slot for a quick shot that tied it at 1.
Pastrnak got free on a breakaway and put Boston up 2-1 with a power-play goal 8:37 into the second period. Matt Grzelcyk set it up with a long pass from deep in the Boston zone to Pastrnak, who had gotten behind Washington's defense.
Eller jumped on a turnover at the blue line and got a wrist shot past Ullmark to tie it at 2 late in the second.
Bruins winger Brad Marchand appeared to injure his right shoulder in the second period when he was hit from behind into the boards by Garnet Hathaway, who was called for interference on the play. Marchand did not return. ... Boston's Anton Blidh needed a few minutes and a hand from a trainer to get back on his skates after getting levelled on a hit by Wilson with 4:33 left in the first. Blidh also did not return. ... The Capitals placed RW T.J. Oshie on injured reserve Thursday for an upper-body injury that had kept him out of the previous two games. Oshie will be eligible to return Monday when the Capitals host Vegas. ... Washington D John Carlson and F Conor Sheary remained in COVID-19 protocol and did not play. ... The Capitals were also without D Dmitry Orlov, who served the first of a two-game suspension for kneeing Winnipeg F Nikolaj Ehlers on Tuesday.
Capitals: Host the Ottawa Senators on Saturday.
Bruins: Host the Winnipeg Jets on Saturday.