The aim of this study was to evaluate the association between previous hepatitis B virus (HBV) infection and the severity of primary biliary cholangitis (PBC). A total of 379 HBsAg-negative PBC patients were investigated between 2012 and 2017 in this study. Fifty-two of these patients underwent liver biopsy. The enrolled patients were divided into an anti-HBc-positive group and an anti-HBc-negative group; the patients with liver biopsy were further divided into early stage (stage I) and advanced stage (stages II, III, and IV) according to histological assessment. Liver fibrosis was also assessed by noninvasive prognosis scores including the Mayo Risk Score, the Newcastle model, the aspartate aminotransferase-to-platelet ratio index, the fibrosis index based on the four factors (FIB-4), and the albumin-bilirubin score. The difference in disease stage between the two groups was assessed by histological stage and noninvasive scores predicting fibrosis. The histology showed that more patients in the anti-HBc-positive group had advanced stage compared with anti-HBc-negative patients (P<0.05). Higher Mayo Risk Score, the Newcastle model, aminotransferase-to-platelet ratio index, and fibrosis index based on the four factors (all P<0.05) were obtained in all patients except for the albumin-bilirubin score (P=0.096). Previous HBV infection was associated with a worse histological stage and advanced fibrosis score of PBC. It appears that the previous HBV infection may have aggravated the PBC severity, potentially leading to poorer outcomes.