Background: There is a lack of biomarkers for predicting the efficacy of immunotherapy in triple-negative breast cancer (TNBC). Hence, we constructed an immune risk score (IRS) model to predict the prognosis of patients with TNBC and evaluate those who are sensitive to immunotherapy.Methods: The ribonucleic acid (RNA) sequencing data, mutation data, and clinical information of TNBC patients were obtained from The Cancer Genome Atlas database. Data of immune-related genes were obtained from the Import and InnateDB databases. The IRS model was constructed using univariate, least absolute shrinkage and selection operator, and multivariate Cox regression analyses, and the predictive ability of the prognostic model was evaluated. Further external validation was performed using the Gene Expression Omnibus (GEO) databases GSE58812 and GSE135565. Data on the clinical characteristics, immune landscape, and immune checkpoint inhibitors used in different risk groups were analyzed. Finally, the drug sensitivity of the patients in the high- and low-risk groups was predicted.Results: The prognostic risk score model comprised six genes: HSPA6, LCN1, ARTN, IL36G, BCL2A1, and CASP12. The area under the curve values at 1 year, 3 years, and 5 years were 0.835, 0.852, and 0.843, respectively, indicating that the model has a good potential for predicting the long-term survival of TNBC patients, which is consistent with the results of the GEO cohort. Compared with the high-risk group, the low-risk group had a better prognosis; more abundant immune-activated cell infiltrates, such as CD8+ T cells and CD4 memory-activated T cells, and a higher enrichment of immune-related signaling pathways, such as the cytokine receptor interaction, nucleotide oligomerization domain-like receptor signal pathway, T-cell receptor signal pathway, and B-cell receptor signaling pathway, were observed. In addition, the immune checkpoint encoding genes, such as CD274, CTLA4, PDCD1, and PDCD1LG2 were highly expressed in the low-risk group, which showed that this group was more likely to benefit from immunotherapy.Conclusion: A new IRS gene feature was established to predict the patients’ prognosis and guide immunotherapy. Moreover, it was revealed that several potential therapeutic drugs can be used in high-risk patients who are unresponsive to immunotherapy.