MLB made the announcement on Friday afternoon. The league said it notified Ramirez of an "issue" with him regarding the MLB's Joint Drug Prevention and Treatment Program, and rather than undergo the process, Ramirez opted to retire.
Ramirez, 38, got off to a slow start for Tampa Bay this season, going 1-for-17 in five games.
Ramirez, who's made more than $200 million in his career, signed a one-year, $2 million deal with Tampa Bay this offseason.
According to The New York Times, Manny tested positive for a performance-enhancing drug during spring training and was recently informed of the positive result. The slugger would have faced a 100-game suspension. He was also suspended in 2009 for 50 games for testing postive for hCG, a female fertility drug typically used to mask steroid use.
"We are obviously surprised and disappointed by this news," the Rays announced on Friday. "We will have no further comment on this matter, and our fans and organization will carry on."
In 19 Major League seasons, Ramirez batted .312 with 555 home runs and 1,831 RBIs. He was a surefire Hall of Famer before that suspension in 2009, and the suspicious circumstances of his retirement will likely add to the case against him.
Ramirez played the most games (1,083) and hit the most homers (274) for Boston, where he spent eight years. He was expected to return to Fenway Park next week with the Rays for just the second time since he was traded away at the 2008 trade deadline.
He won two World Series with the Red Sox, and in 111 postseason games, he owns a .285 batting average to go with 29 home runs and 78 RBIs.