Postpartum depression (PPD) is associated with several psychological and obstetric factors. Hepatitis B virus (HBV) infection has been linked with a high risk of depression, but little is known about the relationship between maternal HBV infection and PPD. We aimed to investigate the association between HBV infection and PPD. This retrospective cohort study included 3,808 mothers who gave birth in a hospital in southern China. Self-reported Edinburgh Postnatal Depression Scale (EPDS) was used to assess PPD. Multivariate logistic regression was used to determine whether maternal HBV infection was associated with PPD risk. Of the 3,808 participants, 11.9% of mothers had PPD at 6 weeks postpartum. Two hundred and seventy-eight (7.3%) and 3,530 (92.7%) were in the HBV and control groups, respectively. Women with HBV infection were more likely to test positive for PPD (14.7 vs.11.7%). The multivariate logistic regression analysis showed that HBV-infected women did not have a significantly higher incidence of PPD (OR = 1.23; 95% CI, 0.82-1.84) than those without HBV infection in the study cohort. Parity and postpartum hemorrhage were found to be associated with PPD. In addition, our study showed that e antigen positivity was not associated with PPD risk (OR = 0.56, 95% CI 0.19-1.63). To our knowledge, this is the first investigation of the relationship between maternal HBV infection and PPD. In a cohort of women without prior history or family history of mental illness, having HBV infection was not significantly associated with self-reporting of PPD compared to not having HBV infection.