BackgroundIdiopathic Pulmonary Fibrosis (IPF) can be described as a debilitating lung disease that is characterized by the complex interactions between various immune cell types and signaling pathways. Chromatin-modifying enzymes are significantly involved in regulating gene expression during immune cell development, yet their role in IPF is not well understood.MethodsIn this study, differential gene expression analysis and chromatin-modifying enzyme-related gene data were conducted to identify hub genes, common pathways, immune cell infiltration, and potential drug targets for IPF. Additionally, a murine model was employed for investigating the expression levels of candidate hub genes and determining the infiltration of different immune cells in IPF.ResultsWe identified 33 differentially expressed genes associated with chromatin-modifying enzymes. Enrichment analyses of these genes demonstrated a strong association with histone lysine demethylation, Sin3-type complexes, and protein demethylase activity. Protein-protein interaction network analysis further highlighted six hub genes, specifically KDM6B, KDM5A, SETD7, SUZ12, HDAC2, and CHD4. Notably, KDM6B expression was significantly increased in the lungs of bleomycin-induced pulmonary fibrosis mice, showing a positive correlation with fibronectin and α-SMA, two essential indicators of pulmonary fibrosis. Moreover, we established a diagnostic model for IPF focusing on KDM6B and we also identified 10 potential therapeutic drugs targeting KDM6B for IPF treatment.ConclusionOur findings suggest that molecules related to chromatin-modifying enzymes, primarily KDM6B, play a critical role in the pathogenesis and progression of IPF.