Outfielder Braxton Lee and right-hander Ethan Clark are expected to be included in the deal, which is pending physical examinations.
The clubs have yet to officially announce the trade.
Hechavarria has been on the disabled list since May 10 with an oblique injury. The 28-year-old Cuban signed with Toronto as a free agent in 2010 and has batted .255 over parts of six seasons with the Blue Jays and Marlins.
Rookie J.T. Riddle has played at short for Miami in the absence of Hechavarria, who is a two-time finalist for the National League Gold Glove Award.
Matt Duffy was expected to be Tampa Bay's shortstop this season, but has yet to play due to his recovery from left heel surgery. He had another procedure to remove a calcium deposit from the area last week.
Tim Beckham has made 67 starts at shortstop this season for the Rays. He has provided some offensive pop by batting .278 with 10 homers and 31 RBIs, but has also committed nine errors.
Lee, who was batting .318 with two homers and 12 stolen bases for Double-A Montgomery, is a former 12th-round pick in the 2014 draft out of Ole Miss.
Clark, who was a 15th-round selection in 2015, owns a 3-2 mark with a 3.11 ERA for Bowling Green in the Class A Midwest League.