Ramírez was originally signed as undrafted free agent by the San Diego Padres on April 23, 2001.
From 2002 to 2003, Ramírez spent both seasons with the Rookie League Idaho Falls Padres. He had no home runs either seasons and hit .179 in 2002 and improved to .266 in 2003. In 2004, he split the season between the Rookie League Arizona Padres and the Single-A Eugene Emeralds. In a combined 43 games, he hit .259 with 2 home runs. He also led the Arizona Padres in stolen bases with 16, stealing them in just 39 games.
In 2005, Ramírez spent the season with the Single-A Fort Wayne Wizards. Playing in 104 games, he batted .222 with 8 home runs and 46 RBIs.
Ramírez played for the Single-A Lake Elsinore Storm in 2006. He played in just 78 games, batting .252 with 3 home runs. In 2007, Ramírez began the season for the Storm again. Ramírez played in 82 games, batting .269 with 4 home runs and 22 stolen bases. On July 19, Ramírez was promoted to the Triple-A Portland Beavers, where he would round out the season. He hit .315 with 4 home runs in 30 games. Ramírez set numerous career highs in 2007, including batting average (.283), RBIs (61), hits (117), stolen bases (28), games played (112), runs scored (63), and doubles (20).
Ramirez was widely regarded as the best defensive outfielder in the Padres' system, and made numerous highlight-reel catches. Following the 2007 season, Ramírez became a minor league free agent. On November 16, 2007, the Houston Astros signed him to a major league contract.
On July 1, 2010, he was designated for assignment while on the 40-man roster to make room for recently acquired Ángel Sánchez.