Background: Pneumonia refers to the inflammation of the terminal airway, alveoli and pulmonary interstitium, which can be caused by pathogenic microorganisms, physical and chemical factors, immune damage, and drugs. Anemoside B4, the major ingredient of Pulsatilla chinensis (Bunge) Regel, exhibited anti-inflammatory activity. However, the therapeutic effect of anemoside B4 on pneumonia has not been unraveled. This study aims to investigate that anemoside B4 attenuates the inflammatory responses in Klebsiella pneumonia (KP)-and influenza virus FM1 (FM1)-induced pneumonia mice model. Methods: The network pharmacology and molecular docking assays were employed to predict the targets of anemoside B4's treatment of pneumonia. Two models (bacterial KP-infected mice and virus FM1-infected mice) were employed in our study. BALB/c mice were divided into six groups: control, model group (KP-induced pneumonia or FM1-induced pneumonia), anemoside B4 (B4)-treated group (2.5, 5, 10 mg/kg), and positive drug group (ribavirin or ceftriaxone sodium injection). Blood samples were collected for hematology analysis. The effects of B4 on inflammation-associated mediators were investigated by Enzyme-linked immunosorbent assay (ELISA) and hematoxylin and eosin staining (HE) staining. Proteins expression was quantified by western blotting. Results: The network results indicated that many pro-inflammatory cytokines such as tumor necrosis factor α (TNF-α), interleukin-1β (IL-1β), and interleukin-6 (IL-6) participated in anemoside B4's anti-inflammatory activity. The counts of neutrophil (NEU) and white blood cell (WBC), the level of myeloperoxidase (MPO), and the release of proinflammatory cytokines TNF-α, IL-1β, and IL-6 increased by KP or FM1 infection, which were reversed by anemoside B4. In addition, anemoside B4 significantly suppressed the FM1-induced expression of toll-like receptor 4 (TLR4), myeloid differential protein-88 (MyD88), and myeloid differentiation protein-2 (MD-2), which were further validated by molecular docking data that anemoside B4 bound to bioactive sites of TLR4. Therefore, anemoside B4 exhibited a significant therapeutic effect on pneumonia via the TLR4/MyD88 pathway.