The commissioner's office didn't announce the specific violation by the Los Angeles Dodgers outfielder, who will lose about one-third of his $25 million salary.
"Recently I saw a physician for a personal health issue. He gave me a medication, not a steroid, which he thought was OK to give me," Ramirez said in a statement issued by the players' union.
"Unfortunately, the medication was banned under our drug policy. Under the policy that mistake is now my responsibility. I have been advised not to say anything more for now. I do want to say one other thing; I've taken and passed about 15 drug tests over the past five seasons."
This is the second major drug revelation to hit baseball in the last few months. In February, Alex Rodriguez admitted taking steroids while playing for Texas from 2001-03. But that was before the start of testing with penalties under a program agreed to by players and management. The New York Yankee star doesn't appear likely to be suspended.
Ramirez is the third player suspended this year under the major league program, following Philadelphia reliever J.C. Romero and Yankees pitcher Sergio Mitre.
Just two relatively low-profile players were suspended under the major league program last year, San Francisco catcher Elizier Alfonzo and Colorado catcher Humberto Coto.
In the past, the best-known player penalized was Baltimore's Rafael Palmeiro, who received a 10-day suspension in 2005, the first year of penalties for first infractions.