OBJECTIVE: The COVID-19 pandemic caused disruptions in in-person mental health (MH) care and a rapid uptake of virtual MH care, but there is little research on the impacts of this on patients' ability to continue their MH medications. This study used population-level data to examine the impact of the pandemic on MH medication nonadherence. METHODS: This retrospective study used electronic health record and claims data to identify 149,977 patients with MH diagnoses at three U.S. health systems who filled at least one MH medication in the 9 months before and after 3/14/2020. The primary outcome was nonadherence to MH medications (i.e., a disruption in coverage ≥ 25%) during the pandemic. RESULTS: Pre-pandemic, 39% of patients had MH medication nonadherence, while 35% had nonadherence during the pandemic. Nonadherence during the pandemic improved for nearly all patient subgroups, with the exception of Black patients, for whom MH medication nonadherence increased from 47% to 49%. Asian, Black, and Hispanic patients were less adherent to MH medications during the pandemic than White patients, and patients with lower education or income were less adherent than patients with higher education or income. Non-rural patients were less adherent to MH medication than rural patients. CONCLUSIONS: Adherence to MH medications improved during the pandemic for all subgroups except Black patients. Despite these improvements, disparities in MH medication adherence persisted for Asian, Black, and Hispanic patients and for patients with lower education or income, suggesting these populations may need additional outreach and support.