Patients with inflammatory bowel disease (IBD) are more likely to be confirmed with vitamin D deficiency. However, the association between inflammation and vitamin D remains unclear. The purpose of this study was to evaluate the association between inflammation and vitamin D in hospitalized patients with IBD. All the participants were recruited from one teaching hospital from June 2018 to October 2022. Inflammation was evaluated by serum concentration of C-reactive protein (CRP), using an immunoturbidimetric method at admission. We further divided the participants into five groups based on serum CRP levels: <5, 5-9.9, 10-19.9, 20-39.9, and >40mg/L. Serum 25-hydroxy-vitamin D (25-(OH)-D) was assessed by liquid chromatography tandem mass spectrometry. Addi-tional information, including age, sex, body mass index (BMI), IBD (ulcerative colitis vs. Crohn's disease) subtype, was abstracted from medical records. This study included 1,989 patients with IBD (average age was 39.4 years, 33.8% of them were women, 1,365 CD and 624 UC patients). The median CRP was 5.49 mg/L (range of quartiles: 1.64~19.5 mg/L) and the prevalence of 25-(OH)-D deficiency was 69.8%. CRP was significantly associated with serum level of 25-(OH)-D. The difference in 25-(OH)-D was -4.28 ng/ml (-5.27 ng/ml, -3.31 ng/ml) between two extremist CRP groups after adjustment of potential covariates (age, sex, BMI, type of IBD, dietary type, season, and lymphocyte count). Subgroup analysis in sex, type of IBD, and age, were similar to the main analysis results. There was a negative association between CRP levels and vitamin D in hospitalized patients with IBD.