Objective. To investigate the role of CXXC5 and the CD40/CD40L pathway in lung fibrosis. Methods. (1) We constructed mouse models of bleomycin-induced pulmonary fibrosis and transfected them with a CXXC5 overexpression vector to evaluate the severity of pulmonary fibrosis. (2) Mouse lung fibroblast (MLF) models stably overexpressed or knockout of CXXC5 vector were constructed. After transforming growth factor-β1 (TGF-β1) stimulation, we examined the proliferation and apoptosis of the MLF model and evaluated the expression of mesenchymal markers and the CXXC5/CD40/CD40L pathway. Results. (1) Compared with other groups, the overexpressed CXXC5 group had less alveolar structure destruction, thinner alveolar septum, and lower Ashcroft score. (2) In bleomycin-induced mice, the expression of CD40 and CD40L increased at both transcriptional and protein levels, and the same changes were observed in α-smooth muscle actin (α-SMA) and collagen type I (Colla I). After upregulation of CXXC5, the increase in CD40, CD40L, α-SMA, and Colla I was attenuated. (3) Stimulated with TGF-β1, MLF proliferation was activated, apoptosis was suppressed, and the expression of CD40, CD40L, α-SMA, and Colla I was increased at both transcriptional and protein levels. After upregulation of CXXC5, these changes were attenuated. Conclusion. CXXC5 inhibits pulmonary fibrosis and transformation to myofibroblasts by negative feedback regulation of the CD40/CD40L pathway.