Major League Baseball announced the suspension Tuesday, effective immediately.
Beckham, the former No. 1 overall draft selection, tested positive for Stanozolol, according to MLB.
"I was given a product from a trusted source, who had advised me that it was safe to take," Beckham said in a statement. "Regrettably, the product was tainted."
Beckham also said he presented his case to an independent arbitrator and that he is "disappointed in the result."
"I accept full responsibility for putting myself in this position," Beckham said. "I sincerely apologize to the Mariners' organization, the fans, my teammates, and my family for this mistake. I look forward to resuming my career once my suspension has been served."
Beckham, 29, was batting .237 with 15 home runs and 47 RBIs this season.
The Mariners released a statement on the suspension, saying the team was "disappointed" that Beckham violated the policy.