The aim of this study was to evaluate the mutation spectrum of homologous recombination repair (HRR) genes and its association with tumor immune infiltration and prognosis in triple-negative breast cancer (TNBC). TNBC patients (434 patients from Ruijin cohort) were evaluated with targeted next-generating sequencing for mutations in HRR genes. The frequencies of mutations were compared with public reference cohorts (320 TNBC patients from METABRIC, 105 from TCGA, and 225 from MSKCC 2018). Associations between mutation status and tumor immune infiltration and prognosis were analyzed. HRR genes mutations were seen in 21.89% patients, with BRCA1/2 mutations significantly enriched in tumors with breast/ovarian cancer family history (P = 0.025) and high Ki-67 levels (P = 0.018). HRR genes mutations were not related with recurrence-free survival (RFS) (adjusted P = 0.070) and overall survival (OS) (adjusted P = 0.318) for TNBC patients, regardless of carboplatin treatment (P > 0.05). Moreover, tumor immune infiltration and PD-L1 expression was positively associated with HRR or BRCA1/2 mutation (all P < 0.001). Patients with both HRR mutation and high CD8+ T cell counts had the best RFS and OS, whereas patients with no HRR mutation and low CD8+ T cell counts had the worst outcomes (RFS P < 0.001, OS P = 0.019). High frequency of HRR gene mutations was found in early TNBC, with no prognostic significance. Immune infiltration and PD-L1 expression was positively associated with HRR mutation, and both HRR mutation and high CD8+ T cell infiltration levels were associated with superior disease outcome.