ObjectiveThe aims of this study were to investigate the prevalence of hepatitis B virus (HBV) and hepatitis C virus (HCV) infection in inflammatory bowel disease (IBD) patients and the risk factors related to the infection and nonimmune status.MethodsA retrospective study was carried out at two clinical centers. The prevalence of viral markers and risk factors related to HBV and HCV infection and nonimmune status were analyzed in IBD patients. Age-matched and sex-matched healthy individuals were recruited as the controls.ResultsA total of 980 IBD patients were included in this study. Present and past HBV infection was detected in 41.21% of the IBD group, which was higher than that in the general population (P=0.003). Age older than 30 years (P=0.000), ulcerative colitis (P=0.002), and previous surgery (P=0.039) were found to be significant risk factors for HBV infection in the multivariate analysis. 36.43% of the patients in the IBD group had nonimmune status against HBV, and age less than 40 years (P=0.011) and Crohn's disease (P=0.002) were identified as independent risk factors in the multivariate analysis. The prevalence of HCV infection was low and similar to that of the general population.ConclusionThe prevalence of HBV infection in IBD patients in China was higher than that in Europe, USA, and the general population in China, but the prevalence of HCV infection in IBD patients was similar to that in the general population in this study. The frequency of nonimmune status against HBV was high, especially in young Crohn's disease patients, and HBV vaccination should be intensified and have a targeted coverage. Copyright (C) 2017 Wolters Kluwer Health, Inc. All rights reserved.