Hampus Lindholm and McAvoy each had a goal and an assist. Brad Marchand had two assists.
"I thought our best defense was our [offensive] zone possession game," Bruins coach Jim Montgomery said. "Our defensemen kept a lot of pucks alive being really aggressive, and all I know is it's great to have an elite [defensive] core like we do led by Lindholm and McAvoy -- who scored two unbelievable goals to get us going -- and I thought they led us tonight with our intensity and puck possession game."
James Reimer made 18 saves for San Jose (14-25-9).
"No mystery why they have the record they have," Sharks coach David Quinn said. "Obviously, I didn't think we were on our game in a lot of areas. [We] hung around a little bit, but you know, just two goals to get beat 1-on-1, and just didn't get much going tonight."
Lindholm gave Boston a 1-0 lead at 7:16 of the first period, dangling his way into the slot before scoring with a wrist shot.
"If you could put it in the back of the net every game, you would," Lindholm said. "It's a league with good players and good goalies, so it's not as easy as it looks, but it's fun that we can create some offense and take some load off [David] Pastrnak and Marchand, so they can get a little night off."