YangshenDingzhi granules (YSDZ) are clinically effective in preventing and treating COVID-19. The present study elucidates the underlying mechanism of YSDZ intervention in viral pneumonia by employing serum pharmacochemistry and network pharmacology. The chemical constituents of YSDZ in the blood were examined using ultra-performance liquid chromatography-quadrupole/orbitrap high-resolution mass spectrometry (UPLC-Q-Exactive Orbitrap MS). Potential protein targets were obtained from the SwissTargetPrediction database, and the target genes associated with viral pneumonia were identified using GeneCards, DisGeNET, and Online Mendelian Inheritance in Man (OMIM) databases. The intersection of blood component-related targets and disease-related targets was determined using Venny 2.1. Protein-protein interaction networks were constructed using the STRING database. The Metascape database was employed to perform enrichment analyses of Gene Ontology (GO) functions and Kyoto Encyclopedia of Genes and Genomes (KEGG) signaling pathways for the targets, while the Cytoscape 3.9.1 software was utilized to construct drug-component-disease-target-pathway networks. Further, invitro and invivo experiments were performed to establish the therapeutic effectiveness of YSDZ against viral pneumonia. Fifteen compounds and 124 targets linked to viral pneumonia were detected in serum. Among these, MAPK1, MAPK3, AKT1, EGFR, and TNF play significant roles. Invitro tests revealed that the medicated serum suppressed the replication of H1N1, RSV, and SARS-CoV-2 replicon. Further, invivo testing analysis shows that YSDZ decreases the viral load in the lungs of mice infected with RSV and H1N1. The chemical constituents of YSDZ in the blood may elicit therapeutic effects against viral pneumonia by targeting multiple proteins and pathways.