This study aimed to determine the impact of current hepatitis B virus (HBV) infection on patients hospitalised with sepsis. This was a retrospective cohort study. Patients from three medical centres in Suzhou from 10 January 2016 to 23 July 2022 participated in this study. Demographic characteristics and clinical characteristics were collected. A total of 945 adult patients with sepsis were included. The median age was 66.0 years, 68.6% were male, 13.1% presented with current HBV infection, and 34.9% of all patients died. In the multivariable-adjusted Cox model, patients with current HBV infection had significantly higher mortality than those without (hazard ratio (HR) 1.50, 95% confidence interval (CI) 1.11–2.02). A subgroup analysis showed that being infected with HBV significantly increased in-hospital mortality in patients younger than 65 years old (HR 1.74, 95% CI 1.16–2.63), whereas no significant impact was observed in patients ≥65 years. The propensity score-matched case–control analysis showed that the rate of septic shock (91.4% vs. 62.1%,P< 0.001) and in-hospital mortality (48.3% vs. 35.3%,P= 0.045) were much higher in the propensity score-matched HBV infection group compared with the control group. In conclusion, current HBV infection was associated with mortality in adults with sepsis.