Background. Breast cancer-related depression (BCRD) seriously inhibits the life quality of patients with breast cancer. The Xiaoyao Kangai Jieyu Formula is known to inhibit the progression of depression. However, the detailed function of the Xiaoyao Kangai Jieyu Formula in BCRD remains unclear. Methods. Network pharmacology was constructed to assess the downstream target of the Xiaoyao Kangai Jieyu Formula in BCRD. In addition, the tail suspension test, sucrose preference test, and forced swimming test were used to test the symptom of depression in mice. Fluoro-Jade B staining was performed to observe the structure of neurons. RT-qPCR and western blot were applied to evaluate mRNA and protein levels. Besides, ELISA was performed to test the inflammatory responses and the immune response-related cytokines. Results. Quercetin was identified as the key component of the Xiaoyao Kangai Jieyu Formula. Quercetin significantly inhibited BCRD-induced neuron pyroptosis via downregulation of PYD and card domain containing (ASC), NLR family pyrin domain containing 3 (NLRP3), and caspase-1, and quercetin could reverse BCRD-caused inhibition of neuron viability. Quercetin significantly attenuated the symptom of BCRD in mice, and it could reverse the contents of 5-hydroxytryptamine (5-HT), dopamine (DA), and neutrophil elastase (NE) in mice. Moreover, quercetin could promote the immune responses in xenograft mice via upregulation of interleukin- (IL-) 2, interferon-γ (IFN-γ), and IL-10. Conclusion. Quercetin, the active ingredient of the Xiaoyao Kangai Jieyu Formula, effectively mitigated the progression of BCRD by inhibiting pyroptosis, promoting immune response, and improving serum metabolism.