The risk of suicide is elevated among patients with treatment-resistant depression (TRD). Risk factors for suicide and suicide attempts among cases and controls with TRD were investigated using data from nationwide Swedish registers. Among 119,407 antidepressant initiators with a diagnosis of depression, 15,631 patients who started a third sequential treatment trial during the same depressive episode were classified with TRD. A nested case-control study compared cases with suicide and suicide attempts with up to three closely matched controls. Sociodemographic and clinical risk factors were assessed using conditional logistic regression analyses. In all, 178 patients died by suicide and 1,242 experienced a suicide attempt during follow-up. History of suicide attempts, especially if <1 year after the attempt, was a significant independent risk factor for suicide (adjusted odds ratio [aOR], 8.9; 95% confidence interval [CI], 5.1–15.7) as were 10 to 12 years of education compared to lower education (aOR, 1.69; 95% CI, 1.02–2.81). For attempted suicide, the strongest independent risk factors were history of suicide attempts (<1 year aOR, 5.1; 95% CI, 4.0–6.5), substance abuse (aOR, 2.6; 95% CI, 2.2–3.1), personality disorders (aOR, 1.9; 95% CI, 1.5–2.3), and somatic comorbidity (aOR, 2.0; 95% CI, 1.04–3.9). Suicide attempts, especially if recent, are strong risk factors for completed suicide among patients with TRD. Established risk factors for suicide attempts were confirmed for patients with TRD.