With just under 9 minutes left, Chara unloaded a low slap shot from straight away about 10 feet inside the blue line that beat Rangers goaltender Henrik Lundqvist between his pads.
After he fired his shot, Chara was knocked to the ice. When the puck went into the net, while still on his knees, he pumped his fists in the air in celebration.
"I saw an opening. I put a puck on net as quick and as hard as I could," said the 6-foor-9 Chara, still in uniform standing at his locker. "It was a good job by everybody."
In the second period, Chara squared off with the Rangers' Brian Boyle, knocking him to the ice and bringing a loud roar from the sellout TD Garden crowd. It was Chara's first fighting major of the season.
"I feel it's been a while since the last time we've had a fight like that," Boston goalie Tuukka Rask said. "It usually happens in the blink of an eye. It gives a team a boost and really wakes up a crowd, a crowd gets really loud. I think as a team -- I can't say we woke up -- but it definitely gave us an extra boost and we never looked back after that."
Brad Marchand also scored for the Eastern Conference-leading Bruins, who improved to 9-2-2 in their last 13 games.
Rask stopped 17 shots for Boston, which hasn't lost in regulation at home in its last 10 games (8-0-2).
Lundqvist made 25 saves for the Rangers, who played their first game in Boston since the Bruins eliminated them in five games in the second round of the Eastern Conference playoffs last spring.
"I don't think we played the way we needed to in the second or the third," Rangers captain Ryan Callahan said. "They seemed to be all over us and they eventually get the tying goal and the winning goal there. We've got to be better in the second and third. It wasn't good enough."
Boston had tied it 2-2 on Bergeron's goal early in the third period. His shot was stopped by Lundqvist, but caromed into the net off defenseman Dan Girardi, who was in front with the Bruins Loui Eriksson.
"It's nice to get one of those," Bergeron said. "I haven't got one in a while."
Chara pushed Boston ahead later with his shot that Lundqvist said he misplayed.
"Bad read. For some reason, I was reading a high shot and then just made a bad move," Lundqvist said. "Instead of playing it the way I should, I read his stick, and I thought it was going high. I don't know if he fell down or kind of missed it, but it definitely fooled me a little bit. Tough one."
The Bruins were called for too many men on the ice with 4½ minutes left, but held the Rangers without any good scoring chances.
Returning after missing four games due to a lower-body injury was Bruins defenseman Dennis Seidenberg, who logged 24:43 of ice time Friday afternoon.
"I felt good. It was good to be back on the ice and playing with the guys," Seidenberg said. "The best thing is we got a win."
With New York trailing 1-0 in the first period, Nash and McDonagh scored 1:22 apart. Nash, playing his sixth game after missing 17 with a concussion sustained on Oct. 8, tied it when he spun around near the right circle and slipped a wrister inside the left post.
McDonagh moved the Rangers ahead when his rising shot from the high slot beat Rask inside the left post. Benoit Pouliot screened Rask on the shot.
"He was right there," Rask said.
The Bruins had jumped ahead 1-0 when Marchand one-timed Chara's cross-ice pass under the crossbar from the bottom of the right circle for just his second goal in 11 games.
Midway into a well-paced but scoreless second, Boston's Torey Krug nailed the left post with a wrist shot. The Bruins had a handful of other good scoring bids that were shot just wide or turned aside by Lundqvist.
Both teams had excellent scoring chances in the game's opening minutes. Boston's Chris Kelly redirected a shot that hit the post and Carl Soderberg fired one that sneaked between Lundqvist's pads but trickled just wide. New York's Derick Brassard cut in alone for a decent bid that Rask stopped 6 minutes into the contest.
Boston was coming off a 6-1 loss at Detroit on Wednesday, its first of three games in four days.
"Those kinds of games do happen," Chara said. "It's good to bounce back and regroup from games like that."
Rangers LW Taylor Pyatt played his second consecutive match after missing eight with a concussion. ... New York faces Vancouver and former Rangers coach John Tortorella at home Saturday. Rangers coach Alain Vigneault was Vancouver's coach before joining New York. ... Boston hosts Columbus on Saturday. ... The Bruins won the first meeting 2-1 at Madison Square Garden on Nov. 19. The teams meet one more time in the regular season, March 2 in New York. ... The Rangers entered tied for the NHL lead with nine road wins.
Information from ESPNBoston.com's Joe McDonald and The Associated Press was used in this report.