Background: Luminal B breast cancer is always routinely treated with chemotherapy and endocrine therapy but heterogeneous with respect to sensitivity to treatment, identification of patients who may most benefit remains a matter of controversy. Immune-related genes (IRGs) was found to be associated with the prognosis of breast cancer. The aim of this study is to evaluate the impact of IRGs in predicting the outcome of luminal B breast cancer patients. Methods: According to the Metabric microarray datasetxa0also as a training cohort, 488 luminal B breast cancer patients were selected for generation of immune-related gene signature (IRGS). Another independent dataset (n=250) of patients with complete prognostic information was analyzed as a validation cohort. Prognostic analysis was assessed to test the predictive value of IRGS. Results: A model of prognostic IRGS containing 12 immune-related genes was developed. In both training and validation cohorts, IRGS significantly stratified luminal B breast cancer patients into immune low- and high-risk groups in terms of disease free survival (DFS, HR=4.95, 95% CI=3.22-7.62, P<0.001 in training cohort, HR=2.47, 95% CI=1.29-4.75, P<0.001 in validation cohort). Multivariate analysis revealed IRGS as an independent prognostic factor (HR=4.96, 95% CI=3.00-8.18, P<0.001 in training cohort, HR=2.56, 95% CI=1.28-5.09, P=0.007 in validation cohort). Furthermore, those 12 genes mostly related with response to chemical, and the expression levels of them were completely opposite in patients of immune low- and high-risk groups. Conclusions: The proposed IRGS is a satisfactory prognostic model for estimating DFS of luminal B breast cancer patients. Further studies are needed to assess the clinical effectiveness of this system in predicting prognosis and treatment options for luminal B breast cancer patients. This work was supported by National Natural Science Foundation of China (No. 81602520), Natural Science Foundation of Guangdong Province (No. 2017A030313596).