Abstract Idiopathic pulmonary fibrosis (IPF) is a chronic, progressive fibrotic disease with an unclear etiology and no effective treatment. This study aims to elucidate the pathogenic mechanism networks involving multiple targets and pathways in IPF. Extracts and metabolites of Astragalus membranaceus (AM) and Radix paeoniae rubra (RPR), two well-known traditional Chinese medicines, have demonstrated therapeutic effects on IPF. However, the underlying mechanisms of AM and RPR remain unclear. Utilizing network pharmacology analysis, differentially expressed genes (DEGs) associated with IPF were obtained from the GEO database. Targets of AM and RPR were identified using the TCM Systems Pharmacology Database and Analysis Platform and SwissTargetPrediction. A protein–protein interaction (PPI) network was subsequently constructed and analyzed using the STRING database and Cytoscape software. Gene ontology enrichment analysis and kyoto encyclopedia of genes and genomes analysis were conducted using Metascape. Additionally, a component-target-pathway network and a Sankey diagram were employed to identify the main active components, and molecular docking was performed between these components and proteins encoded by key targets. Finally, in vivo studies were conducted based on network pharmacology. A total of 117 common targets between DEGs of IPF and drug targets were identified and included in the PPI network, in which AKT1, MAPK3, HSP90AA1, VEGFA, CASP3, JUN, HIF1A, CCND1, PTGS2, and MDM2 were predicted as key targets. These 117 targets were enriched in the PI3K-AKT pathway, HIF-1 signaling pathway, apoptosis, and microRNAs in cancer. Astragaloside III, (R)-Isomucronulatol, Astragaloside I, Paeoniflorin, and β-sitosterol were selected as the main active components. Docking scores ranged from − 4.7 to − 10.7 kcal/mol, indicating a strong binding affinity between the main active compounds and key targets. In vivo studies have indeed shown that AM and RPR can alleviate the pathological lung fibrotic damage caused by bleomycin treatment. The treatment with AM and RPR resulted in a reduction of mRNA levels for key targets AKT1, HSP90AA1, CASP3, MAPK3, and VEGFA. Additionally, the protein expression levels of AKT1, HSP90AA1, and VEGFA were also reduced. These results support the therapeutic potential of AM and RPR in ameliorating pulmonary fibrosis and provide insight into the molecular mechanisms involved in their therapeutic effects.