Boychuk will earn $3.1 million, $3.4 million and $3.6 million respectively over the terms of the new deal, according to Bruins general manager Peter Chiarelli. There's also a limited no-trade clause.
"I'm obviously happy," Boychuk said. "It wasn't really a big secret I wanted to stay here, so I'm just excited.
"Boston as a city is probably the best place to play, and even though I haven't played anywhere else, the fans are just so into it, they're always cheering and it's sold out every night. Why wouldn't you want to stay here?"
That attitude led to Boychuk pushing for the no-trade language.
"I obviously don't want to go anywhere else but here," he said.
"Johnny really wanted to stay here and that's the over-riding theme," Chiarelli said. "He's obviously been a good performer for us. He's a big, strong and physical (defenseman).
"He's a Bruin-type of player. He's physical, yet he can score with his shot. He's a punishing player. He chose not to test the market, which was nice for us."
Boychuk, 28, has three goals and seven assists for 10 points in 53 games this season, and is plus-22. Overall, he's played a total of 178 games, with 11 goals and 30 assists for 41 points, and a plus-48. He also has 130 penalty minutes.
Boychuk, who will earn $2 million this season, would have been an unrestricted free agent July 1.
Talks between the sides began about a month ago and Chiarelli admitted that had Boychuk tested the free-agent market, the defenseman would have earned more, but he made it a point to the organization that he wanted to remain with Boston.
"I would think if Johnny went to the market he could have gotten more," Chiarelli said. "The grass isn't always greener."
"It's nice that he signed," said Zdeno Chara, who is Boychuk's defensive partner. "He deserves that and he plays hard. It's great for him."
Joe McDonald covers the Bruins for ESPNBoston.com.