The hepatitis B virus (HBV) is a major global issue, because an increased risk of hepatocellular carcinoma among patients infected with HBV is well established. Recently, it has been suggested that HBV is associated with other human cancers. However, the association between HBV and the risk of onset of hematological malignancies remains controversial. The aim of this large-scale retrospective cohort study was to evaluate the association between HBV infection and hematological malignancies. A retrospective analysis of 86,115 newly admitted patients at Shanghai Ruijin Hospital was performed. A cohort of patients previously exposed to HBV (n = 1,874) and a cohort of individuals without a positive test for anti-hepatitis B core antigen (anti-HBc; n = 45,118) were compared to assess the risk of hematological malignancies. Anti-HBc was positive in 61.2% cases and 54.3% controls (p = 0.0001). The risk of B cell non-Hodgkin's lymphoma, acute lymphoblastic leukemia, and multiple myeloma was higher in the HBV-infected cohort than in the non-HBV-infected cohort. In conclusion, patients infected with HBV have a substantially increased risk of hematological malignancies.