Ramirez batted .268 with seven homers and 41 RBI in 99 games with Cleveland last season. He was acquired by the Cubs for cash in November.
Chicago got minor league infielder Esteban Quiroz in the deal with Tampa Bay. The 30-year-old Quiroz hit .268 with 12 homers and 48 RBI in 68 games with Triple-A Durham last year.
A native of Cartagena, Colombia, Ramirez, 27, is a .271 hitter over parts of three seasons with Miami and Cleveland. He ranked sixth among NL rookies with 116 hits for the Marlins in 2019.