Onana was found to have Furosemide in his urine during a routine test by UEFA officials.
The 24-year-old took the substance, which was originally prescribed for his wife, after feeling unwell.
A statement on the Ajax website says: "On the morning of October 30, Onana was feeling unwell. He wanted to take a pill to ease the discomfort. Unknowingly, however, he took Lasimac, a drug that his wife had previously been prescribed.
"Onana’s confusion resulted in him mistakenly taking his wife's medicine, ultimately causing this measure to be taken by UEFA against the goalkeeper.
"Furthermore, the disciplinary body of the football association has stated that Onana had no intention of cheating. However, the European Football Association believes, on the basis of the applicable anti-doping rules, that an athlete has a duty at all times to ensure that no banned substances enter the body."
Onana will be unable to feature for Ajax for the rest of the Eredivisie and Europa League campaigns. He is also likely to miss next year’s Africa Cup of Nations tournament should Cameroon qualify.
Ajax intend to appeal the decision at the Court of Arbitration for Sport.
Ajax managing director and former goalkeeper Edwin van der Sar said: “We explicitly renounce performance-enhancing drugs, we obviously stand for a clean sport.
"This is a terrible setback, for Andre himself but certainly also for us as a club. Andre is a top goalkeeper, who has proven his worth for Ajax for years and is very popular with the fans.
"We had hoped for a conditional suspension or for a suspension much shorter than these twelve months, because it was arguably not intended to strengthen his body and thus improve his performance.”