The deal runs through the end of the 2019-20 season and has an average annual value of $4.65 million, the team said in a release.
MacArthur, a 29-year-old, scored a career-high 24 goals and had 31 assists in 79 games last season. He also set career highs with a plus-12 rating and 78 penalty minutes.
"Obviously our happiness with his performance last year was a big reason to give him the term that we did," general manager Bryan Murray said Tuesday.
In 482 regular-season games with Buffalo, Atlanta, Toronto and Ottawa, MacArthur has 268 points and 307 penalty minutes.
Murray described MacArthur as a "character guy," who was a good fit with forward Kyle Turris last season.
MacArthur was Buffalo's third-round pick (74th overall) in the 2003 draft.