Hechavarria was born in Santiago de Cuba to Diosmede and Mirta Hechavarria. He has an older brother, Alien. Hechavarria participated in a Pan American tournament in Mexico in 2006, and played shortstop for the Cuban Junior National team in 2008. In 2009, he defected to Mexico on a boat with 11 others. Agents and other representatives of the Toronto Blue Jays watched him play in workouts in the Dominican Republic, and signed him after his visa paperwork went through in 2010.
On November 19, 2012, Hechavarria was traded to the Miami Marlins along with Henderson Álvarez, Jeff Mathis, Yunel Escobar, Jake Marisnick, Anthony DeSclafani, and Justin Nicolino, in exchange for Mark Buehrle, Josh Johnson, José Reyes, John Buck, and Emilio Bonifacio. On January 29, 2013, Hechavarria was named number 82 on MLB's Top Prospects list. Hechavarria was the Marlins' starting shortstop for the first 14 games of the 2013 season until he was placed on the 15-day disabled list with a sore throwing arm. He was activated from the disabled list on May 2. On May 5, Hechavarria hit a bases-loaded triple and a grand slam against Roy Halladay of the Philadelphia Phillies. On June 8, Hechavarria had an RBI single off Shaun Marcum to score Plácido Polanco in what would be the game winner, as the Marlins beat the Mets in 20 innings. Overall, Hechavarria appeared in 148 games for Miami during the 2013 season. He batted.227./.267/.298, with 3 home runs and 42 runs batted in. He also recorded 8 triples and went 11–for–21 in stolen base attempts. Hechavarria played in 146 games during the 2014 season. His average climbed to.276, 49 percentage points higher than the previous season. He had one home run, 34 runs batted in, and 10 triples. In 2015, Hechavarria made 130 appearances for the Marlins. He batted.281, hit 5 homers, and drove in 48 runs. He was named the National League Player of the Week on April 26 after posting a.500 batting average and 10 RBI during the preceding week. During the 2016 season, Hechavarria appeared in 155 games. His batting average fell to.236. He had three home runs and 38 runs batted in. His.311 slugging percentage was the lowest of all qualified major league batters. He also had the lowest Isolated Power of all MLB players in 2016, at.075. On May 10, 2017, Hechavarria went on the disabled list with a strained oblique muscle. In mid-June he played in 10 rehab games.
Tampa Bay Rays
On June 26, 2017, the Marlins traded Hechavarria to the Tampa Bay Rays for minor leaguers Braxton Lee and Ethan Clark. Hechavarria finished the year with a.267 batting average and a career high 8 home runs. On April 26, 2018, Hechavarria broke Chris Gomez's 2002 franchise record by recording 242 consecutive chances without an error. He also owns the Rays franchise record for 71 consecutive games without an error. On August 1, 2018, Hechavarria was designated for assignment to clear space for the newly acquired Tommy Pham.
Pittsburgh Pirates
On August 6, 2018, Hechavarria was acquired by the Pittsburgh Pirates in exchange for minor league right-handed pitcher Matt Seelinger. The Pirates also received cash considerations in the trade.
On February 18, 2019, Hechavarria signed a minor league, Spring Training invite deal with the New York Mets. On May 3, 2019, Hechavarria triggered an opt-out clause in his deal, and the Mets selected his contract to their MLB roster. He was designated for assignment on August 9 to make room for newly signed second baseman, Joe Panik. He was released on August 14.
Atlanta Braves
On August 16, 2019, the Atlanta Braves signed Hechavarria to fill the Braves' shortstop vacancy with Dansby Swanson on the injured list. On January 16, 2020, the Braves re-signed Hechavarría to a one year deal worth $1 million.