Background Breast cancer (BC), the most frequently seen malignant tumor in female, is associated with increasing morbidity and mortality year by year. Generally, the available treatments for BC include surgery, chemotherapy, radiotherapy, endocrinotherapy and molecular targeted therapy. Typically, as molecular biology, immunology and pharmacogenomics develop, a growing amount of evidence has suggested that immunocyte infiltration into tumor microenvironment, together with the immunophenotype of tumor cells, would remarkably influence the development and malignant transformation of tumor; as a result, immunotherapy has become a promising therapy for treating BC, which would also affect patient prognosis.Methods In this study, samples collected from TCGA and ImmPort database would be analyzed to search for specific immune-related genes affecting BC patient prognosis. A total of 64 immune-related genes with significant correlation with patient prognosis had been screened and performed shrinkage estimate, among which, 29 most representative ones with significant correlation with patient prognosis had been selected and utilized to establish the prognosis prediction model for BC patients (as referred to as the RiskScore equation). Thereafter, samples in both training set and test set would be substituted into the model, respectively; meanwhile, BC patients would also be divided based on the median RiskScore to assess the efficiency, accuracy and stability of the model in predicting and classifying patient prognosis. Subsequently, functional annotations, GO and KEGG signaling pathway enrichment analysis would be carried out among the 29 as-screened immune-related genes.Results The results found that, these 29 genes could be mainly enriched to numerous BC- and immune microenvironment-related pathways. Eventually, the relationship between RiskScore and the sample clinical features as well as the signaling pathways would be analyzed.Conclusions Our findings indicate that, the prognosis prediction model RiskScore established on the basis of the expression profiles of 29 immune-related genes has displayed high prediction accuracy and stability in identifying the immune features, which can guide the clinicians to diagnose and predict the prognosis for different immunophenotypes, in the meantime of offering numerous therapeutic targets for precisely treating BC in clinic using the identified subtype-specific immune molecules.