Summary Background COVID-19 has spread globally. Epidemiological susceptibility to COVID-19 has been reported in patients with cancer. We aimed to systematically characterise clinical features and determine risk factors of COVID-19 disease severity for patients with cancer and COVID-19. Methods In this multicentre, retrospective, cohort study, we included all adult patients (aged ≥18 years) with any type of malignant solid tumours and haematological malignancy who were admitted to nine hospitals in Wuhan, China, with laboratory-confirmed COVID-19 between Jan 13 and March 18, 2020. Enrolled patients were statistically matched (2:1) with patients admitted with COVID-19 who did not have cancer with propensity score on the basis of age, sex, and comorbidities. Demographic characteristics, laboratory examinations, illness severity, and clinical interventions were compared between patients with COVID-19 with or without cancer as well as between patients with cancer with non-severe or severe COVID-19. COVID-19 disease severity was defined on admission on the basis of the WHO guidelines. Univariable and multivariable logistic regression, adjusted for age, sex, comorbidities, cancer type, tumour stage, and antitumour treatments, were used to explore risk factors associated with COVID-19 disease severity. This study was registered in the Chinese Clinical Trial Register, ChiCTR2000030807. Findings Between Jan 13 and March 18, 2020, 13 077 patients with COVID-19 were admitted to the nine hospitals in Wuhan and 232 patients with cancer and 519 statistically matched patients without cancer were enrolled. Median follow-up was 29 days (IQR 22–38) in patients with cancer and 27 days (20–35) in patients without cancer. Patients with cancer were more likely to have severe COVID-19 than patients without cancer (148 [64%] of 232 vs 166 [32%] of 519; odds ratio [OR] 3·61 [95% CI 2·59–5·04]; p<0·0001). Risk factors previously reported in patients without cancer, such as older age; elevated interleukin 6, procalcitonin, and D-dimer; and reduced lymphocytes were validated in patients with cancer. We also identified advanced tumour stage (OR 2·60, 95% CI 1·05–6·43; p=0·039), elevated tumour necrosis factor α (1·22, 1·01–1·47; p=0·037), elevated N-terminal pro-B-type natriuretic peptide (1·65, 1·03–2·78; p=0·032), reduced CD4+ T cells (0·84, 0·71–0·98; p=0·031), and reduced albumin–globulin ratio (0·12, 0·02–0·77; p=0·024) as risk factors of COVID-19 severity in patients with cancer. Interpretation Patients with cancer and COVID-19 were more likely to deteriorate into severe illness than those without cancer. The risk factors identified here could be helpful for early clinical surveillance of disease progression in patients with cancer who present with COVID-19. Funding China National Natural Science Foundation.