Hepatitis B virus (HBV) infection can activate macrophages to accelerate liver disease progression, including inflammation and fibrosis. However, the exact mechanism remains undetermined. The present study assessed the effects of macrophage polarization and the related cytokines on Th‑17 differentiation in HBeAg positive individuals with a HBV infection, and also evaluated the potential association of Th‑17 cell frequency with the severity of liver injury. A cross‑sectional study design was used to collect the clinical parameters, blood samples and liver tissue samples of patients with alanine transaminase £2x upper limit of normal and confirmed hepatitis B who underwent liver puncture in Qishan Hospital between January 2019‑December 2021. Macrophage and Th‑17 cell related factors were assayed using ELISA. The expression and quantification of cell surface antigen and intracellular markers in cells were assessed using flow cytometry. Pathological staining, including hematoxylin and eosin, reticular fiber staining and immunohistochemical staining were used to assess inflammation and fibrosis in the liver tissue. In the peripheral blood of patients with HBV infection, the number of CD14+ macrophages was significantly increased compared with the healthy control, especially in the hepatitis B e antigen (HBeAg) positive group. CD14+ macrophages were predominantly of the M1 type based on the assessment of the phenotype using flow cytometry and cytokine secretion. Furthermore, the percentage of M1 phenotype and related cytokines were positively correlated with Th‑17 differentiation. IL‑17A secreted by Th‑17 was positively correlated with the degree of liver inflammation and fibrosis, as well as with the severity of liver disease, which indicated that the differentiation of Th‑17 may be involved in the progression of liver disease. HBeAg may promote Th‑17 differentiation and IL‑17A production by M1 macrophages to accelerate the pathogenesis of liver inflammation and fibrosis in CHB patients.