Objective: To investigate the impact of current and remitted depression and anxiety disorders and sociodemographic and other related factors on medication nonadherence in a large cohort study. Method: The Medication Adherence Rating Scale was used to assess medication nonadherence of 1,890 medication users in the 4-year follow-up assessment of the Netherlands Study of Depression and Anxiety, which was conducted between 2008 and 2011. Psychiatric diagnoses according to the DSM-IV, sociodemographic and clinical characteristics, and medication use were determined. Medication nonadherence was defined by the tendency to forget a dose, change the dose, stop for a while, skip 1 dose, or take a smaller dosage than prescribed. Results: Overall medication nonadherence was 44%. In multivariate analyses, all current and remitted depression and anxiety diagnoses were risk factors for medication nonadherence as compared to subjects never having had a depressive or anxiety diagnosis (P < .05). Age (OR = 0.85, P < .001) and antidepressant use (OR = 0.66, P = .001) were associated with less medication nonadherence. Alcohol dependence (OR = 1.67, P = .05) and the number of dietary supplements (OR = 1.18, P = .02) proved risk factors for medication nonadherence. Associations of anxiety diagnosis with medication nonadherence were mainly driven by depression diagnosis. Conclusions: All current and remitted depression and anxiety disorders were risk factors for medication nonadherence. Since these disorders are highly comorbid with other medical conditions, health care workers should address medication nonadherence in patients with depression and/or anxiety disorders, even in those who are in symptomatic remission.