The deal could be worth up to $96 million if the sixth-year option vests, and Chen can opt out of the contract after the second year, sources told Olney.
Chen's option will vest for the 2021 season based on how many innings he pitches in the 2019 and 2020 seasons, sources told Olney.
Chen, 30, was one of the top remaining free-agent pitchers available. He went 11-8 with a 3.34 ERA with the Baltimore Orioles last season.
Chen, a native of Taiwan, figures to serve as Miami's No. 2 starter behind ace Jose Fernandez.
Chen pitched four seasons with the Orioles, going 46-32 with a 3.72 ERA in 117 career starts. He had a breakthrough season in 2014, when he went 16-6 with a 3.54 ERA and helped Baltimore win the AL East.