Villar, 28, led Baltimore with a 4.0 WAR last year, according to FanGraphs. The middle-infielder hit .274/.339/.453 with 24 homers and 40 steals in 2019 and was projected to earn $10.4 million in arbitration this winter.
The Orioles acquired Villar from the Milwaukee Brewers prior to the 2017 trade deadline in a deal that sent Jonathan Schoop the other way.
Miami plans to deploy Villar as a utility player who will split time between third base and the outfield, according to Craig Mish of FNTSY Sports Radio. Isan Diaz, a young second baseman with the Marlins, is thought of very highly within the organization.
Villar has primarily played second and shortstop in the majors, but he's made 54 appearances at third, including 42 during the 2016 season. He's less experienced as an outfielder, though, with just 13 appearances split between left and center, most recently in 2017.
Lucas, who heads back to Baltimore, threw 31 2/3 innings in Low-A last year while making nine starts and three appearances out of the bullpen. The 23-year-old owned a 3.98 ERA over that span.