Huang-Lian-Jie-Du decoction (HLJDD) has been used to treat pneumonia for thousands of years in China. However, our understanding of its mechanisms on treating pneumonia is still unclear. In the present work, network pharmacology was used to analyze the potential active ingredients and molecular mechanisms of HLJDD on treating pneumonia. A total of 102 active ingredients were identified from HLJDD, among which 54 were hit by the 69 targets associated with pneumonia. By performing Gene Ontology (GO) and Kyoto Encyclopedia of Genes and Genomes (KEGG) enrichment analysis, we obtained the main pathways associated with pneumonia and those associated with the mechanism of HLJDD in the treatment of pneumonia. By constructing the protein–protein interaction network of common targets, 10 hub genes were identified, which were mainly involved in the tumor necrosis factor (TNF) signaling pathway, interleukin 17 (IL-17) signaling pathway, and nucleotide-binding oligomerization domain (NOD)-like receptor signaling pathway. Moreover, the results of molecular docking showed that the active ingredients of HLJDD had a good affinity with the hub genes. The final results indicate that HLJDD has a greater effect on bacterial pneumonia than on viral pneumonia. The therapeutic effect is mainly achieved by regulating the host immune inflammatory response and oxidative stress reaction, antibacterial microorganisms, alleviating the clinical symptoms of pneumonia, repairing damaged cells, and inhibiting cell migration.