Importance: Why some triple-negative breast cancers (TNBCs) have high and others have low immune cell infiltration is unknown. Understanding how immune surveillance shapes the cancer genome could help in the selection of patients and the development of more effective immunotherapy strategies. Objective: To examine the association between genomic metrics and the extent of immune infiltration in TNBCs. Design, Setting, and Participants: This study, performed from June 1, 2015, through January 31, 2017, used DNA and RNA sequencing data and messenger RNA expression results from The Cancer Genome Atlas (TCGA) breast cancer data set (n = 1215) to calculate previously described immune metagene expression values and histologic lymphocyte counts to quantify immune infiltration and assign prognostic categories to TNBCs. It used the Molecular Taxonomy of Breast Cancer International Consortium (METABRIC) data set as an independent validation cohort. The study compared clonal heterogeneity, somatic total mutational load, neoantigen load, and somatic copy number alteration levels between immune-rich TNBC cohorts with good prognosis and immune-poor TNBC cohorts with poor prognosis. The study also compared the distribution of mutations in 119 canonical cancer genes. Main Outcomes and Measures: Correlation between immune prognostic category and genomic metrics of the cancer. Results: This study of 193 TNBC samples with patient survival information found an inverse association between clonal heterogeneity and immune metagene expression (ρ = −0.395, P = 2 × 10−8). The study also found an inverse association between immune metagene expression and somatic copy number alteration levels (ρ = −0.484, P = 2 × 10−10). Lymphocyte-rich TNBCs with good prognosis had significantly lower mutation and neoantigen counts than did lymphocyte-poor TNBCs with poor prognosis. The robustness of the study results was confirmed by using various immune metagenes in the same TCGA data set and in the independent METABRIC data set. Conclusions and Relevance: This study suggests that immune-rich TNBCs may be under an immune surveillance that continuously eliminates many immunogenic clones, resulting in lower clonal heterogeneity. These cancers may also represent the subset of TNBCs that could derive benefit from immune checkpoint inhibitor therapy to tilt the balance in favor of the immune system.