The deal is worth $12 million, with Tazawa earning $5 million next season and $7 million in 2018, according to The Associated Press.
Fox Sports was first to report news of the deal Thursday.
The Marlins designated right-hander Nefi Ogando to make room for Tazawa.
The workload appeared to catch up with him the past two seasons. Tazawa needed to be shut down late in the 2015 season because of concerns about fatigue, and he ceded his setup role to Brad Ziegler in 2016.
He endured the worst full season of his career in 2016, finishing with a 4.17 ERA in 53 appearances, and was relegated to mostly low-leverage situations after the All-Star break.
Tazawa entered free agency for the first time after making $3.375 million in arbitration this year.
The addition of Tazawa comes after the Marlins fell short in their pursuit of high-priced closers Aroldis Chapman and Kenley Jansen. Tazawa will help replace left-hander Mike Dunn, who agreed Thursday to a $19 million, three-year contract with Colorado after six seasons with the Marlins.
ESPN Red Sox reporter Scott Lauber and The Associated Press contributed to this report.