Johansson played for New Jersey and Boston last season, finishing with 13 goals and 17 assists in 58 games. The 28-year-old forward also had four goals and seven assists in 22 playoff games, helping the Bruins reach the Stanley Cup Final.
Buffalo announced Johansson's deal on Saturday. The average annual value is $4.5 million.
The Sabres went 33-39-10 last season and missed the playoffs for the eighth straight year. Krueger was hired in May to replace Phil Housley, who was dismissed after just two seasons.
Johansson was selected by Washington in the first round of the 2009 draft and made his NHL debut with the Capitals the following year. He has 120 goals and 214 assists in nine NHL seasons.
More AP NHL: https://apnews.com/NHL and https://twitter.com/AP-Sports