Ramirez, who turns 29 later this month, was designated for assignment by the Yankees on Feb. 28. He takes up the Rangers' final spot on the 40-man roster.
Ramirez had a 5.73 ERA with 22 strikeouts in 22 innings of work (20 relief appearances) with New York in 2009. He had two stints with the Yankees last season, pitching the rest of the time at Triple-A Scranton/Wilkes Barre, where he went 1-5 with a 3.19 ERA in 29 games.
Ramirez was a regular in the Yankees' bullpen in 2008 with a 5-1 record and a 3.55 ERA with 63 strikeouts in 55 1/3 innings. Opposing batters hit .215 against him.
Ramirez was signed by the Angels as an undrafted free agent before the 2001 season and joined the Yankees organization as a minor league free agent in July 2006.