Electroconvulsive therapy (ECT) has long been believed to reduce suicidal tendencies in patients with affective disorders; however, ECT recipients, who constitute the most severely ill and suicidal patients, are not eligible to participate in head-to-head randomized controlled trials. Large-scale studies are required to investigate the anti-suicidal effects of ECT vs psychopharmacotherapy.A nationwide retrospective cohort study design was used. Data were obtained from the Taiwan National Health Insurance Research Database. Inpatients with unipolar disorder or bipolar disorder who received ECT (n = 487) were observed from 1 January 2000 to 31 December 2013 for suicide events. The non-ECT control cohort consisted of inpatients with psychopharmacotherapy randomly matched (ratio, 1:4) by age, sex, and diagnosis.After potential confounds had been accounted for, the adjusted hazard ratio (HR) was 0.803, indicating that ECT recipients showed a 19.7% lower risk of suicide than control individuals. The stratum-specific adjusted HR was 0.79 in patients with unipolar disorder (P = .041) and 0.923 in patients with bipolar disorder (P = .254). Upon further stratification of the patients with bipolar disorder by their affective states, the adjusted HR was 0.805 (P = .046) for bipolar depression, 1.048 for bipolar mania (P = .538), and 0.976 for mixed bipolar state (P = .126).Compared with psychopharmacotherapy, ECT exerted superior anti-suicidal effects in patients with unipolar disorder and bipolar depression; however, there was a lack of superior anti-suicidal effects of ECT in the treatment of patients with bipolar mania and mixed state.