BackgroundAn increasing number of patients with hepatitis B virus (HBV) infection are undergoing total joint arthroplasty (TJA) surgery in China. Less attention is provided to the special populations and the purpose of this study is to assess the effect of HBV infection on the prognosis TJAs.MethodsWe retrospectively reviewed patients who underwent elective primary hip and knee arthroplasties in Shanghai Huashan Hospital from 2013 to 2016. Non-hepatitis B cohort was built to match the case cohort to identify whether HBV infection was a risk factor associated with postoperative complications. A total number of 196 patients who underwent primary TJAs were involved in the study, including 49 patients with hepatitis B and 147 non-hepatitis B subjects.ResultsAmong all the patients with TJAs, 5.5% of patients were infected with HBV for the first time. The incidence rate of complications in patients after arthroplasty with hepatitis B infection was significantly higher than that in patients without hepatitis B (10.2% compared to 4.7%, P < 0.01). Surgical related complications (6.1% compared to 3.4%) and general medical complications (4.1% compared to 1.3%) were higher than those in non-B hepatitis group. Compared with non-B hepatitis group, the overall risk of hepatitis B infection increased by 25% (95% CI, 1.04–1.46; p < 0.01). Similar results were obtained for medical and surgical complications. HBV infection presented a 31% increased risk (95% CI, 1.02–1.62; p < 0.01) for medical complication and an 18% increased risk (95% CI, 1.10–1.26; p < 0.01) for surgical complication. No statistical difference was found between the surgical methods and sex. However, a significant difference of C-reactive protein (CRP) level was found between HBV infection group and the matched non-infected group (P < 0.01).ConclusionThis is the first study to investigate the risk of perioperative complications of hepatitis B in Chinese TJAs patients. In consideration of the large population of HBV infection in China, more attention and medical care should be provided to patients with HBV infection who need to undergo TJA operation.