Idiopathic pulmonary fibrosis (IPF) is a common and heterogeneous chronic disease, and the mechanism of Jinshui Huanxian formula (JHF) on IPF remains unclear. For a total of 385 lung normal tissue samples from the Gene Expression Omnibus database, 37,777,639 gene pairs were identified through microarray and RNA-seq platforms. Using the individualized differentially expressed gene (DEG) analysis algorithm RankComp (FDR < 0.01), we identified 344 genes as DEGs in at least 95 % (n = 81) of the IPF samples. Of these genes, IGF1, IFNGR1, GLI2, HMGCR, DNM1, KIF4A, and TNFRSF11A were identified as hub genes. These genes were verified using quantitative reverse transcriptase polymerase chain reaction (qRT-PCR) in mice with pulmonary fibrosis (PF) and MRC-5 cells, and they were highly effective at classifying IPF samples in the independent dataset GSE134692 (AUC = 0.587-0.788) and mice with PF (AUC = 0.806-1.000). Moreover, JHF ameliorated the pathological changes in mice with PF and significantly reversed the changes in hub gene expression (KIF4A, IFNGR1, and HMGCR). In conclusion, a series of IPF hub genes was identified, and validated in an independent dataset, mice with PF, and MRC-5 cells. Moreover, the abnormal gene expression was normalized by JHF. These findings provide guidance for further exploration of the pathogenesis and treatment of IPF.