Patients with cancer are at increased risk of SARS-CoV-2-associated adverse outcomes. To determine the associations of tumor type with SARS-CoV-2 infection, hospitalization, intensive care unit (ICU) admission, and death. This retrospective, population-based cohort study included community-dwelling adults aged at least 18 years in Ontario, Canada, ICES-linked provincial health databases from January 1, 2020, to November 30, 2021. Data were analyzed from December 1, 2021, to November 1, 2022. Cancer diagnosis. The primary outcome was SARS-CoV-2 infection, and secondary outcomes included all-cause 14-day hospitalization, 21-day ICU admission, and 28-day death following SARS-CoV-2 infection. Cox proportional hazards models were used to obtain adjusted hazard ratios (aHRs) and 95% CIs. Of 11 732 108 people in the ICES-linked health databases, 279 287 had cancer (57.2% female; mean [SD] age, 65.9 [16.1] years) and 11 452 821 people did not have cancer (45.7% female; mean [SD] age, 65.9 [16.0] years). Overall, 464 574 individuals (4.1%) developed SARS-CoV-2 infection. Individuals with hematologic malignant neoplasms (33 901 individuals) were at increased risk of SARS-CoV-2 infection (aHR, 1.19; 95% CI, 1.13-1.25), 14-day hospitalization (aHR, 1.75; 95% CI, 1.57-1.96), and 28-day mortality (aHR, 2.03; 95% CI, 1.74-2.38) compared with the overall population, while individuals with solid tumors (245 386 individuals) were at lower risk of SARS-CoV-2 infection (aHR, 0.93; 95% CI, 0.91-0.95) but increased risk of 14-day hospitalization (aHR, 1.11; 95% CI, 1.05-1.18) and 28-day mortality (aHR, 1.31; 95% CI, 1.19-1.44). The 28-day mortality rate was high in hospitalized patients with hematologic malignant neoplasms (163 of 321 hospitalized patients [50.7%]) or solid tumors (486 of 1060 hospitalized patients [45.8%]). However, the risk of 21-day ICU admission in patients with hematologic malignant neoplasms (aHR, 1.14; 95% CI, 0.93-1.40) or solid tumors (aHR, 0.93; 95% CI, 0.82-1.05) was not significantly different from that among individuals without cancer. The SARS-CoV-2 infection risk decreased stepwise with increasing numbers of COVID-19 vaccine doses received (1 dose: aHR, 0.63; 95% CI, 0.62-0.63; 2 doses: aHR, 0.16; 95% CI, 0.16-0.16; 3 doses: aHR, 0.05; 95% CI, 0.04-0.06). These findings highlight the importance of prioritization strategies regarding ICU access to reduce the mortality risk in increased-risk populations, such as patients with cancer.