Objectives To examine risk of suicide among individuals with hospitalised chronic obstructive pulmonary disease (COPD) and to profile differences according to sex, age, psychiatric history, and recency and frequency of COPD hospitalisations. Design Nested case–control study. Setting Data were retrieved from Danish national registries. Participants All suicide cases aged 40–95 years deceased between 1981 and 2006 in Denmark (n=19 869) and up to 20 live population controls per case matched on sex and date of birth (n=321 867 controls). Main outcome measures The relative risk of suicide associated with COPD was computed using conditional logistic regression and adjusted for effects of psychiatric history and important sociodemographic factors. Results In our study population, 3% of suicide cases had been hospitalised for COPD compared with 1% of matched population controls. Thus, a hospitalised COPD was associated with a significantly increased risk for suicide (OR 2.6; 95% CI 2.3 to 2.8). The increased risk remained significant after adjustment for psychiatric history and sociodemographic variables (OR 2.0; 95% CI 1.8 to 2.2), and increased progressively with frequency and recency of COPD hospitalisation. At the same time, suicide risk associated with COPD differed significantly by sex, age and psychiatric status. The relative risk was more pronounced in women, in individuals older than 60 years and in persons with no history of psychiatric illness. Conclusions COPD confers an important risk factor for suicide completion. Risk assessment and prevention efforts should take patients’ sex, age and psychiatric history into consideration.