Background Breast cancer is a pivotal cause of global women cancer death. Immunotherapy has become a promising means to cure breast cancer. As constitutes of immune microenvironment of breast cancer, macrophages exert complicated functions in the tumour development and treatment. This study aims to develop a prognostic macrophage marker genes signature (MMGS). Methods Single cell RNA sequence data analysis was performed to identify macrophage marker genes in breast cancer. TCGA database was used to construct MMGS model as a training cohort, and GSE96058 dataset was used to validate the MMGS as a validation cohort. Results Genes included in the MMGS model were: SERPINA1, CD74, STX11, ADAM9, CD24, NFKBIA, PGK1. MMGS risk score stratified by overall survival of patients divided them into high- and low-risk groups. And MMGS risk score remained independent prognostic factor in multivariate analysis after adjusting for classical clinical factors in both training and validation cohorts. Besides, hormone receptors negative and human epidermal growth factor receptor 2 (HER2) positive patients had higher risk score. MMGS showed better distinguishing capability between high-risk and low-risk groups in hormone receptor positive and HER2 negative subgroup. Conclusion MMGS provides a new understanding of immune cell marker genes in breast cancer prognosis and may offer reference for immunotherapy decision for breast cancer patients.