Eating disorders (ED) have a high comorbidity with major depressive disorder (MDD). Antidepressants often lack effect in these patients. While electroconvulsive therapy (ECT) is the most effective treatment for severe MDD, there are no large studies in the ED patient group yet. We aimed to compare the outcome of ECT for MDD in patients with and without eating disorders. We conducted a register-based study for patients with MDD and comorbid ED treated with ECT in Sweden between 2012-2023. The outcomes were compared to a matched control group without comorbid ED. The primary outcome was a response to treatment according to the Clinical Global Impression Improvement Scale (CGI-I). Secondary outcomes were remission according to CGI-I and subjective memory complaint. There were 861 patients in the ED group and 1,722 in the control group; of these 93.2% were female. The response rate was 58.4% in the ED group and 62.4% in the control group (OR 0.8, 95% CI 0.7-0.9, p <0.05). The frequency of subjective memory complaints in the ED versus the control group was 25.9% and 24.8%, respectively (OR 1.1, 95% 0.8-1.3 CI, p = 0.6). High response rates after ECT for MDD were found in the ED group but were significantly lower than in the matched control group. Subjective memory complaints did not differ significantly. Further studies are required comparing the outcome of ECT versus alternative treatments among patients with ED complicated by severe MDD.