BACKGROUND: People with mental disorders and intellectual disabilities experience excess mortality compared with the general population. The impact of COVID-19 on exacerbating this, and in widening ethnic inequalities, is unclear. METHODS: Prospective data (N=167,122) from a large mental healthcare provider in London, UK, with deaths from 2019 to 2020, used to assess age- and gender-standardised mortality ratios (SMRs) across nine psychiatric conditions (schizophrenia-spectrum disorders, affective disorders, somatoform/ neurotic disorders, personality disorders, learning disabilities, eating disorders, substance use disorders, pervasive developmental disorders, dementia) and by ethnicity. FINDINGS: Prior to the World Health Organization (WHO) declaring COVID-19 a public health emergency on 30th January 2020, all-cause SMRs across all psychiatric cohorts were more than double the general population. By the second quarter of 2020, when the UK experienced substantial peaks in COVID-19 deaths, all-cause SMRs increased further, with COVID-19 SMRs elevated across all conditions (notably: learning disabilities: SMR: 9.24 (95% CI: 5.98-13.64), pervasive developmental disorders: 5.01 (95% CI: 2.40-9.20), eating disorders: 4.81 (95% CI: 1.56-11.22), schizophrenia-spectrum disorders: 3.26 (95% CI: 2.55-4.10), dementia: 3.82 (95% CI: 3.42, 4.25) personality disorders 4.58 (95% CI: 3.09-6.53)). Deaths from other causes remained at least double the population average over the whole year. Increased SMRs were similar across ethnic groups. INTERPRETATION: People with mental disorders and intellectual disabilities were at a greater risk of deaths relative to the general population before, during and after the first peak of COVID-19 deaths, with similar risks by ethnicity. Mortality from non-COVID-19/ other causes was elevated before/ during the pandemic, with higher COVID-19 mortality during the pandemic. FUNDING: ESRC (JD, CM), NIHR (JD, RS, MH), Health Foundation (JD), GSK, Janssen, Takeda (RS).