Studies from high endemic areas, mostly China, indicate that surface antigen positive (HBsAgpos) chronic hepatitis B virus (HBV) infection is associated with an increased risk of developing diffuse large B-cell lymphoma (DLBCL), whereas studies in low endemic areas have provided conflicting results. Past infection, serologically defined by negative HBsAg and positive anti-core antibody (HBsAgnegHBcAbpos), has also been suggested to increase the risk of B-cell non-Hodgkin’s lymphoma (NHL) in high endemic areas. We retrospectively reviewed unselected clinical records of 253 patients with DLBCL (54% male, aged 60.3 ± 14.6 years at diagnosis) and 694 patients with different types of indolent B-cell NHL (46% male, aged 61.7 ± 12.8 years). Patients were seen at a single center in Italy between 2001 and 2022 and HBV serological status (HBsAg, HBsAb, HBcAb, HBeAg, HBeAb, and HBV DNA) was analyzed through enzyme-linked immunosorbent assays and molecular assays; patients infected with hepatitis C virus or human immunodeficiency virus were excluded. We used an unconditional multiple logistic regression model including as matching variables gender, age at diagnosis, immigrant status, and HBV serological status. Patients with DLBCL had, compared to indolent NHL, a higher prevalence of HBsAgpos active infection (odds ratio (OR) 2.8, 95% confidence interval (95% CI) 1.2–6.3, p = 0.014). Strikingly, patients with DLBCL had also a significantly higher prevalence of past infection (OR 2.4, 95% CI 1.5–4.0, p = 0.0006). Male gender was associated with increased risk of DLBCL independently of the HBV serological status. These findings suggest that both past and active HBV infection may increase the risk of DLBCL in a low endemic area. Our study needs confirmation by studies in areas or populations with different rates of chronic or past HBV infection.