Objectives To detail the effects of vitamin D (VD) deficiency and assess the relationships between VD deficiency and liver function and liver fibrosis in patients with biliary atresia (BA). Methods In this study, BA patients confirmed by intraoperative cholangiography were enrolled between January 2017 and February 2019. Preoperative serum 25-(OH)D level, liver function, serum biomarker levels of liver fibrosis, and histopathologic features were recorded. Deficiency, insufficiency, and sufficiency of VD were defined as serum 25-(OH)D concentrations of <10, 10-20, and >20 ng/ml, respectively. Associations between serum 25-(OH)D level and liver function and liver fibrosis were analyzed. Results A total of 161 BA infants were included. The median (interquartile range (IQR)) serum 25-(OH)D level in all patients was 7.56 (IQR: 4.48–11.40) ng/ml. The rates of 25-(OH)D deficiency, insufficiency, and sufficiency were 67.1% (108/161), 29.2% (47/161), and 3.7% (6/161), respectively. Serum 25-(OH)D level was negatively correlated with alkaline phosphatase (r = ‐0.232, P = 0.003). After adjusting for age, a decrease in serum 25-(OH)D level was correlated with the increase of the Batts-Ludwig stage score (odds ratio (OR): 0.94, 95% confidence interval (CI): 0.88–0.99; P = 0.028). Serum 25-(OH)D level was also correlated with the N-terminal propeptide of type III procollagen (PIIINP) (r = ‐0.246, P = 0.002). Additionally, PIIINP (P = 0.038) and ALP (P = 0.031) were independently associated with serum 25-(OH)D level. Conclusions VD deficiency was common and inversely correlated with liver fibrosis in BA patients. Furthermore, VD was not correlated with liver function except alkaline phosphatase.