The Rangers (41-21-2), who were outshot 33-21, had lost two in a row.
WATCH: All Rangers vs. Bruins highlights
"All I wanted today was to win, to be honest with you," Lundqvist said. "My wife asked me the other day, 'What do you want for your birthday?' 'I don't know, nothing.' But then today, I want to win, that's all. I want to come here and play my best and try to help the team get a win.
"It's tough to lose two at home, you want to feel good about your game, you want to feel good about where we are. And so I tried to leave everything out there today, and in the end up we came up with some big plays, some big blocks, and it wasn't pretty at times but we found a way."
The Rangers tied the Pittsburgh Penguins for third place in the Metropolitan Division with 84 points. The Penguins have two games in hand.
Buchnevich scored his first goal in 13 games at 5:10 of the third period to give the Rangers a 1-0 lead. He had two goals, including one in overtime, and one assist for Hartford in a 4-3 American Hockey League win against Springfield on Wednesday.
"We were told he was Hartford's best player [Wednesday] night," Rangers coach Alain Vigneault. "Came in tonight and I thought he played a strong game."
Lindberg made it 2-0 at 9:35 with a shot from the right hash mark.
The Bruins beat Lundqvist with their 30th shot when Brad Marchand tapped in a rebound of a David Pastrnak attempt to make it 2-1 at 12:56.
Tuukka Rask made 19 saves for Boston (33-25-6), which had won three in a row. The Bruins lost for the second time in nine games under coach Bruce Cassidy (7-2-0).
The Bruins outshot the Rangers 9-3 in the first period but didn't score a first-period goal for the first time in 11 games.
"We had a chance to take the lead and extend the lead in the first period," Cassidy said. "We were the better team, had the better chances, gave up nothing. But Lundqvist was good, he's a good goalie, a very good goalie. And he showed it tonight and he gave them a chance to win."
The Bruins are two points behind the Ottawa Senators for second place in the Atlantic Division; the Senators defeated the Colorado Avalanche 2-1.