The club announced the deal on Wednesday.
The deal includes a base salary of $1.75 million in 2012, with a $2.5 million option for 2013 and a buyout of $250,000 in the event that the club does not use the option.
"Fernando's pure stuff is top-notch and can beat hitters both in and out of the strike zone," Rays executive vice president of baseball operations Andrew Friedman said. "We feel he will be able to maximize his ability with us to further strengthen our bullpen."
Rodney, who played for the Los Angeles Angels the last two seasons, told The Associated Press last week in the Dominican Republic that he will try to win the closer's spot with the Rays in spring training.
"... (Tampa Bay) told me that the closer position is undefined. I will fight for that spot. I have faith in God that in a fight for the position, I'll be the winner," Rodney said.
Rodney, 34, is 22-38 with a 4.29 ERA and 87 saves in his nine-year major league career. He had 37 saves with Detroit in 2009, but was used as a setup man in 2010 and then last season was virtually unused by the Angels, working just 10 innings in the second half.
With Kyle Farnsworth earning a career-high 25 saves in 31 opportunities, the Rays made the playoffs for the third time in four seasons. The right-hander was hampered in September by tenderness in his pitching elbow, though, and the addition of Rodney will give also manager Joe Maddon someone who can fill the closer role on days that Farnsworth is not available.
Rodney signed an $11 million, two-year contract with Los Angeles as a free agent after the 2009 season. He was 7-8 with 17 saves in 28 opportunities with the Angels.
Enrique Rojas covers Major League Baseball for ESPNDeportesLosAngeles.com. Information from The Associated Press contributed to this report.