Background/purpose Cancer immunotherapy has revolutionized the clinical treatment of several tumors. Immune infiltration has been found to be closely related to clinical prognosis, but it shows limited activity in breast cancer (BC). Therefore, this study aimed to explore the infiltration pattern of immune cells in BC, and to find potential prognostic markers and new therapeutic targets.Patients and methods We downloaded the immune genome data of BC from the Cancer Genome Atlas (TCGA), and analyzed the tumor- infiltrating immune cells (TIICs) in BC for the first time using the CIBERSORT algorithm. The aim of this study was to assess the proportions of 22 immune cell subsets in BC and examine the correlation between each TIIC and overall survival (OS) as well as clinical characteristics.Results The results indicated that: (1) there was a significant difference between the immune infiltration spectrum of cancerous and adjacent tissues, with M2 macrophages, M0 macrophages, and CD4 + T cells being highly expressed in BC; (2) CD8 + T cells were positively correlated with activated CD4 + memory T cells and negatively correlated with M0 macrophages, and M2 macrophages was inversely correlated with M1 macrophages, T cells regulatory, T cells CD8; (3) T cells, macrophages and BC TNM stage, age, clinical stage were correlated (P < 0.05); and (4) high expression of M2 macrophage markers could be an independent biomarker of poor prognosis and a potential therapeutic target for BC.Conclusion This study provides a new research method for the systematic study of immune cells in the BC tumor microenvironment, and provides theoretical guidance for further experiments to verify M2 macrophages and T cell subsets as a potential target for immunotherapy and prognosis.