ObjectiveThe specific mechanism of Xihuang Pill in the treatment of breast precancerous lesions and breast cancer has not yet been elucidated.MethodsIn our study, BATMAN-TCM (a Bioinformatics Analysis Tool for Molecular mechanisms of Traditional Chinese Medicine) was used to forecast the relationship among chemical components, immune targets, and diseases of each herb in Xihuang Pill and constructed a component-target-disease network. Taking breast precancerous lesion model rats as the research object, the molecular mechanism of Xihuang Pill regulating immunity was analyzed.ResultsBATMAN-TCM prediction showed that 309 genes were enriched in the biological process of “immune system response”, which was the target of Xihuang Pill to regulate the immune system. The target of breast cancer disease and the genes related to Xihuang Pill’s immune system response were crossed, and 88 cross genes were obtained. According to the enrichment results of GO/KEGG pathway, T cell activation was found to be the most relevant. We select Th1 cells (IL-2, IFN-γ) and Th2 cells (IL-4, IL-10) among them for animal experiment verification. The results show that Xihuang Pill can upregulate the serum IFN-γ and IL-2 levels, reduce the IL-4 and IL-10 levels, and regulate the balance of Th1/Th2 cells in the peripheral blood of rats with breast precancerous lesions.ConclusionXihuang Pill targets a variety of immune-related molecules related to breast precancerous lesions and is a traditional Chinese medicine formula that effectively regulates immune function.