The Bruins also agreed to terms with forward Brett Connolly on a one-year deal worth $1.025 million and forward Brandon DeFazio on a one-year, two-way contract worth a cap figure of $575,000 at the NHL level.
He scored 19 goals and added 16 assists for 35 points in 72 games for the Panthers during the 2014-15 season. The 25-year-old forward has played in 168 NHL games for both the Panthers and the Chicago Blackhawks, recording 36 goals and 30 assists for 66 points.
Hayes played three season for Boston College (2008-11) and won a national championship with the Eagles in 2010. The Toronto Maple Leafs originally drafted the 6-foot-6, 221-pound forward in the second round (No. 60 overall) in the 2008 NHL draft.
The Bruins acquired Connolly, 23, from the Tampa Bay Lightning at the trade deadline last season. He was limited to only five games because he suffered a broken hand in his second practice with the Bruins. He played 50 games for the Lightning last season and recorded 12 goals and 16 assists for 34 points before the trade.
DeFazio, 26, played two games for the Vancouver Canucks last season, including his NHL debut on Nov. 9 against the Anaheim Ducks. The veteran forward has spent most of his pro career in the AHL, posting 60 goals and 58 assists for 118 points in 288 games with the Utica Comets, Wilkes-Barre/Scranton Penguins and the Bridgeport Sound Tigers.