Pneumonia refers to a death-causing infection. Astragali Radix (AR) and Atractylodis Macrocephalae Rhizoma (AMR) are widely used as traditional tonic and promising edible immunomodulatory herbal medicine, but the systemic mechanism is not well understood. Therefore, a strategy based on network pharmacology and molecular docking was designed to explore the systemic mechanism of AR-AMR acting on pneumonia. After a series of bioinformatics assays, seven kernel targets were obtained, including TNF, IL6, IFNG, IL1B, IL10, IL4, and TLR9. And seven key compounds were identified as the synergy components of AR-AMR acting on pneumonia, the four key compounds belonging to AR were (3R)-3-(2-hydroxy-3,4-dimethoxyphenyl)-7-chromanol, formononetin, quercetin, and kaempferol, the three key compounds belonging to AMR were atractylone, 14-acetyl-12-senecioyl-2E, 8E, 10E-atractylentriol, and alpha-Amyrin. The crucial pathways were mainly related to three modules, including immune diseases, infectious disease, and organismal systems. Collectively, these observations strongly suggest that the molecular mechanisms of AR-AMR regulating pneumonia were closely related to the correlation between inflammation and immune response. PRACTICAL APPLICATIONS: Astragali radix and Atractylodis macrocephalae rhizoma can be used as "medicine-food homology" for dietary supplement. AR and AMR are widely used as a traditional tonic and promising edible immunomodulatory herbal medicine. The AR-AMR herb pairs are used for compatibility many times in the recommended prescriptions in COVID-19 develop pneumonia in China. However, the ingredients and mechanisms of AR-AMR acting on Pneumonia via immunomodulation are unclear. In this paper, bioinformatics and network biology were used to systematically explore the mechanisms of the AR-AMR herb pairs in treatment of pneumonia, and further analyze the correlation mechanism between it and COVID-19 develop pneumonia. To sum up, our study reveals the interrelationships between components, targets, and corresponding biological processes of AR-AMR acting on pneumonia. Understanding these relationships may provide guidance and theoretical basis for the further application of AR-AMR herb pairs.