Animal studies have suggested a link between benzodiazepine and related Z-drug (BZDR) use and immune dysfunction. Corresponding evidence in humans is limited and focuses mainly on pneumonia. This study aimed to assess the association of incident BZDR use with subsequent development of serious infections. This Swedish register-based study included a population-based demographically matched cohort, a co-twin control cohort, and an active comparator cohort. Out of 7,362,979 individuals aged below 65 years who were BZDR naïve by 2007, 713,896 BZDR recipients with incident dispensation of any BZDRs between 2007 and 2019 were 1:1 matched to 713,896 nonrecipients from the general population; 9197 BZDR recipients were compared with their 9298 unexposed co-twins/co-multiples; and 434,900 BZDR recipients were compared with 428,074 incident selective serotonin reuptake inhibitor (SSRI) recipients. The outcomes were identified by the first inpatient or specialist outpatient diagnosis of serious infections in the National Patient Register, or death from any infections recorded as the underlying cause in the Cause of Death Register. Cox proportional hazards regression models were fitted and controlled for multiple confounders, including familial confounding and confounding by indication. To study a possible dose-response association, the cumulative dosage of BZDRs dispensed during the follow-up was estimated for each BZDR recipient and modeled as a time-varying exposure with dose categories in tertiles [≤ 20 defined daily doses (DDDs), > 20 DDDs ≤ 65, and > 65 DDDs). The risk of infections was assessed in BZDR recipients within each category of the cumulative BZDR dosage compared to their demographically matched nonrecipients. In the demographically matched cohort (average age at incident BZDR use 42.8 years, 56.9% female), the crude incidence rate of any serious infections in BZDR recipients and matched nonrecipients during 1-year follow-up was 4.18 [95% confidence intervals (CI) 4.13-4.23] and 1.86 (95% CI 1.83-1.89) per 100 person-years, respectively. After controlling for demographic, socioeconomic, clinical, and pharmacological confounders, BZDR use was associated with 83% relative increase in risk of any infections [hazard ratio (HR) 1.83, 95% CI 1.79-1.89]. The risk remained increased, although attenuated, in the co-twin cohort (HR 1.55, 95% CI 1.23-1.97) and active comparator cohort (HR 1.33, 95% CI 1.30-1.35). The observed risks were similar across different types of initial BZDRs and across individual BZDRs, and the risks increased with age at BZDR initiation. We also observed a dose-response association between cumulative BZDR dosage and risk of serious infections. BZDR initiation was associated with increased risks of serious infections,even when considering unmeasured familial confounding and confounding by indication. The exact pathways through which BZDRs may affect immune function, however, remain unclear. Further studies are needed to explore the neurobiological mechanisms underlying the association between BZDR use and serious infections, as it can lead to safer therapeutic strategies for patients requiring BZDR.