Most studies of severe/fatal COVID-19 risk have used routine/hospitalisation data without detailed pre-morbid characterisation. Using the community-based UK Biobank cohort, we investigate risk factors for COVID-19 mortality in comparison with non-COVID-19 mortality. We investigated demographic, social (education, income, housing, employment), lifestyle (smoking, drinking, body mass index), biological (lipids, cystatin C, vitamin D), medical (comorbidities, medications) and environmental (air pollution) data from UK Biobank (N = 473,550) in relation to 459 COVID-19 and 2626 non-COVID-19 deaths to 21 September 2020. We used univariate, multivariable and penalised regression models. Age (OR = 2.76 [2.18–3.49] per S.D. [8.1 years], p = 2.6 × 10–17), male sex (OR = 1.47 [1.26–1.73], p = 1.3 × 10–6) and Black versus White ethnicity (OR = 1.21 [1.12–1.29], p = 3.0 × 10–7) were independently associated with and jointly explanatory of (area under receiver operating characteristic curve, AUC = 0.79) increased risk of COVID-19 mortality. In multivariable regression, alongside demographic covariates, being a healthcare worker, current smoker, having cardiovascular disease, hypertension, diabetes, autoimmune disease, and oral steroid use at enrolment were independently associated with COVID-19 mortality. Penalised regression models selected income, cardiovascular disease, hypertension, diabetes, cystatin C, and oral steroid use as jointly contributing to COVID-19 mortality risk; Black ethnicity, hypertension and oral steroid use contributed to COVID-19 but not non-COVID-19 mortality. Age, male sex and Black ethnicity, as well as comorbidities and oral steroid use at enrolment were associated with increased risk of COVID-19 death. Our results suggest that previously reported associations of COVID-19 mortality with body mass index, low vitamin D, air pollutants, renin–angiotensin–aldosterone system inhibitors may be explained by the aforementioned factors.