Ristolainen, who was a restricted free agent, had been skating with the Sabres without a contract since returning from the World Cup of Hockey 2016, where he represented Team Finland.
"Rasmus has already proven to be a pivotal player on our blue line, and we are eager to have him back with the team," Sabres general manager Tim Murray said. "This deal is a reflection of the hard work and improvement Rasmus has shown since being drafted, and we hope to see him continue on this trajectory moving forward."
Ristolainen, who will turn 22 on Oct. 27, dressed for every game last season and led Buffalo defensemen with nine goals, 32 assists and 41 points. He also led the team in average ice time per game (25:16) and ranked 10th among NHL defensemen,
A first-round pick (No. 8) by the Sabres in the 2013 NHL Draft, Ristolainen has 65 points (19 goals, 46 assists) in 194 games during three seasons.
The Sabres open their season against the Montreal Canadiens at KeyBank Center on Thursday (7 p.m. ET; SN360, RDS, MSG-B).