Recently several studies have demonstrated the implications of mutations in DNA damage response (DDR) pathways for immune checkpoint blockade (ICB) treatment. However, smaller sample sizes, lesser cancer types, and the lack of multivariate-adjusted analyses may produce unreliable results. From the Memorial Sloan-Kettering Cancer Center (MSKCC) cohort, we curated 1363 ICB-treated patients to evaluate the association of DDR mutations with immunotherapy prognosis. Besides, 4286 ICB-treated-naive patients from the Cancer Genome Atlas (TCGA) cohort were used to explore the intrinsic prognosis of DDR mutations. Factors in the microenvironment regarding DDR mutations were also assessed. We found that patients with DDR mutations exhibited a significantly prolonged immunotherapy overall survival via multivariate Cox model in the MSKCC cohort (HR: 0.70, P < 0.001). Specific cancer analyses revealed that patients with DDR mutations could obtain the better ICB prognosis in bladder cancer and colorectal cancer (HR: 0.59 [P = 0.034] and 0.33 [P = 0.006]). Stratified analyses showed that age >60, male gender, high mutation burden, and PD-1/PD-L1 treatment were the positive conditions for ICB survival benefits of DDR mutations (all P < 0.01). Mutations of 4 DDR genes, including MRE11A, MSH2, ATM, and POLE could predict favorable ICB prognoses (all P < 0.01). A better immune microenvironment was observed in DDR mutated patients. Mutations in DDR pathways or single DDR genes were associated with preferable ICB efficacy in specific cancers or subpopulations. Findings from our study would provide clues for tailing clinical trials and immunotherapy strategies.