Background: Earlier meta-analysis has publicized that Radix Astragali (RA) and Radix Angelicae sinensis (RAS) are valuable to pulmonary function and exercise capacity in patients with idiopathic pulmonary fibrosis (IPF). Objectives: The objective of the study was to regulate the pharmacological mechanism of RA and RAS in IPF treatment. Materials and Methods: Microarray datasets for IPF were examined in the Gene Expression Omnibus database and differentially expressed genes (DEGs) were recognized. Active compounds and target genes of RA and RAS were recognized using the Traditional Chinese Medicine Systems Pharmacology platform. The DEGs were combined with the active target genes to construct a medicine-compound-gene network and a protein–protein interaction network using Cytoscape software. Gene ontology function enrichment and Kyoto Encyclopedia of Genes and Genomes pathway enrichment were studied using RGUI. A gene-pathway network was established using Cytoscape and molecular docking was done using AutoDock Tool and AutoDock Vina software. Results: We recognized 1566 DEGs and 40 candidate target genes of RA and RAS acting on IPF. The six key active compounds prophesied were quercetin, kaempferol, stigmasterol, 7-O-methylisomucronulatol, formononetin, and beta-sitosterol. Following network construction and enrichment, the two main pathways were acknowledged, namely the tumor necrosis factor signaling pathway and advanced glycation end (AGE) products receptor for AGE signaling pathway. Preliminary molecular docking to confirm interactions between key compounds and their protein targets in the pathways was carried out. Conclusion: The pharmacological mechanisms of RA and RAS in IPF treatment have been further elucidated, which could show valuable in future studies on their mechanisms of action for the treatment of IPF.