The key active component(s) in an anti-tumor preparation used in traditional Chinese medicine, Xihuang Pills, remains unclear. We used a network pharmacology analysis to construct a component-disease-target network diagram and used this to determine quercetin as a critical active ingredient in Xihuang Pills. Subsequently, human hepatocellular carcinoma (HCC) cell lines, H22 and HepG2 cells, were treated with quercetin, and BALB/c mice were injected with H22 cells and treated with different concentrations of quercetin. Tumor volume and weight were determined in these mice with and without quercetin administration. Immune and pro-inflammatory factors were measured using Enzyme Linked Immunosorbent Assay (ELISA). Macrophage polarization was assessed by western blot and flow cytometry. Finally, PD-L1, autophagy-related proteins, and the NF-κB pathway were also analyzed. Quercetin could significantly inhibit the proliferation, migration, and invasion characteristics of HCC cells and promote apoptosis in a concentration-dependent manner in vitro. After quercetin treatment, tumor volume and weight significantly decreased in vivo. Granulocyte-macrophage and granulocyte colony-stimulating factor (GM-CSF and G-CSF, respectively) levels were blunted in response to quercetin, as well as the PD-L1 level. CD86+ cell ratio was increased, while the CD206+ cell ratio was decreased, suggesting that macrophages tend to undergo M1 polarization in response to quercetin. The expression of LC3 II/I was increased, while the expression of p62 was down-regulated. The pro-inflammatory factors TNF-α, IL-6, and IL-17A, as well as NF-κB signaling were suppressed in a quercetin concentration-dependent manner. Quercetin is a key ingredient of anti-HCC activity in Xihuang Pills by regulating macrophage polarization and promoting autophagy via the NF-κB pathway.