Maybin said in a statement released by the players' union that the failed test was the result of a change in the medication he was using to treat attention deficit disorder.
Under the drug agreement between MLB and the union, 25 games is the penalty for a second positive amphetamine test. A first positive results in six unannounced follow-up tests over the next year.
Maybin, 27, is batting .247 with one home run and nine RBIs in 62 games.
"I understand that I must accept responsibility for this mistake and I will take my punishment and will not challenge my suspension," Maybin said. "I apologize to my family, friends, fans, teammates, and the entire Padres organization."