Chafin, 31, gets a $1 million signing bonus, $5.5 million this season and $6.5 million in 2023.
He had a 1.83 ERA with a career-high five saves and 64 strikeouts in 71 games in 2021, splitting the season with the Chicago Cubs and Oakland Athletics. His ERA ranked No. 5 in the majors among relievers and he ranked among baseball's leaders in opponents' on-base and slugging percentage and opponents' slugging percentage.
Chafin has appeared in 311 games since 2017, trailing only Oakland's Yusmeiro Petit total of 318 games. He was selected by Arizona as a supplemental first-round selection with the 43rd overall pick in the 2011 amateur draft. Chafin has a 3.30 ERA over eight seasons with 355 career strikeouts.
The newly acquired reliever joins a new-look team, which includes shortstop Javier Baez and left-hander Eduardo Rodriguez, who will start Friday's exhibition opener and perhaps Detroit's opener against the Chicago White Sox on April 8.