The clinical prognosis of breast cancer is closely related to its infiltrating immune status. The study sought to explore tumor-infiltrating immune cells (TILs) and immune-associated genes in the tumor microenvironment of breast invasive carcinoma (BRCA). The ESTIMATE algorithm was used to evaluate the microenvironment of breast cancer patients in TCGA database. The tumor's matrix score and immune score were obtained. The median was divided into two sub groups according to the median of the score, and the correlation between the score and prognosis was also discussed. Differentially expressed genes were screened from two subgroups with high and low score of breast cancer, and the differentially expressed genes were analyzed by GO and KEGG enrichment to explore their possible molecular functions, biological processes, cellular components and signal pathways involved in gene enrichment. It was found that there was a significant correlation between immune score and five-year survival rate, and the high score group had a better prognosis. Macrophage M1 and T cell CD8+ cells were positively related to 5-year overall survival in patients with breast invasive carcinoma. However, Macrophage M2 was negatively related to 5-year overall survival. We also observed that the low expression of four genes (CLEC3A, MCTS1, PDP1 and TCP1,) was related to favorable survival outcomes. High expression of FOXP3, CXCL9, CCR5, CXCR3, and CD37 was related to a high overall survival rate in BRCA. We identified a list of immune – related cells and genes that are useful for Prognostic evaluation and individualized treatment of BRCA.