The COVID-19 pandemic burdens hospitals, but consequences for quality of care outcomes such as healthcare-associated infections are largely unknown. This cohort included all adult hospital episodes (n=186 945) at an academic centre between January 2018 and January 2021. Data were collected from the hospitals’ electronic health record data repository. Hospital-onset bloodstream infection (HOB) was defined as any positive blood culture obtained ≥48 hours after admission classified based on microbiological and hospital administrative data. Subgroup analyses were performed with exclusion of potential contaminant bacteria. The cohort was divided into three groups: controls (prepandemic period), non-COVID-19 (pandemic period) and COVID-19 (pandemic period) based on either PCR-confirmed SARS-CoV-2 infections from respiratory samples or International Classification of Diseases 10th Revision diagnoses U071 and U72 at discharge. Adjusted incidence rate ratios (aIRR) and risk of death in patients with HOB were compared between the prepandemic and pandemic periods using Poisson and logistic regression. The incidence of HOB was increased for the COVID-19 group compared with the prepandemic period (aIRR 3.34, 95% CI 2.97 to 3.75). In the non-COVID-19 group, the incidence was slightly increased compared with prepandemic levels (aIRR 1.20, 95% CI 1.08 to 1.32), but the difference decreased when excluding potential contaminant bacteria (aIRR 1.15, 95% CI 1.00 to 1.31, p=0.04). The risk of dying increased for both the COVID-19 group (adjusted odds ratio (aOR) 2.44, 95% CI 1.75 to 3.38) and the non-COVID-19 group (aOR 1.63, 95% CI 1.22 to 2.16) compared with the prepandemic controls. These findings were consistent also when excluding potential contaminants. In summary, we observed a higher incidence of HOB during the COVID-19 pandemic, and the mortality risk associated with HOB was greater, compared with the prepandemic period. Results call for specific attention to quality of care during the pandemic.