After the 2005 season, the Red Sox traded Ramírez, along with Aníbal Sánchez, Jesús Delgado, and Harvey García, to the Florida Marlins in exchange for Josh Beckett, Mike Lowell, and Guillermo Mota. During spring training, Ramírez was impressive enough to earn the starting shortstop job over Robert Andino. On April 3, he recorded his first Major League hit in his first at-bat of the season, a single to center field off of Houston Astros pitcher Roy Oswalt. On April 18, he led off the game with his first Major League home run off of Eric Milton of the Cincinnati Reds. He hit his second home run in the seventh inning of that game against reliever Mike Burns.