Background Diffuse large B-cell lymphoma (DLBCL) is the most common subtype of non-Hodgkin's lymphoma in adults, whose prognostic scoring system remains to be improved. Dysfunction of DNA repair genes is closely associated with the development and prognosis of diffuse large B-cell lymphoma. The aim of this study was to establish and validate a DNA repair-related gene signature associated with the prognosis of DLBCL and to investigate the clinical predictive value of this signature. Methods DLBCL cases were obtained from The Cancer Genome Atlas (TCGA) and Gene Expression Omnibus (GEO) databases. One hundred ninety-nine DNA repair-related gene sets were retrieved from the GeneCards database. The LASSO Cox regression was used to generate the DNA repair-related gene signature. Subsequently, the level of immune cell infiltration and the correlation between the gene signature and immune cells were analyzed using the CIBERSORT algorithm. Based on the Genomics of Drug Sensitivity in Cancer (GDSC) database, the relationship between the signature and drug sensitivity was analyzed, and together with the nomogram and gene set variation analysis (GSVA), the value of the signature for clinical application was evaluated. Results A total of 14 DNA repair genes were screened out and included in the final risk model. Subgroup analysis of the training and validation cohorts showed that the risk model accurately predicted overall survival of DLBCL patients, with patients in the high-risk group having a worse prognosis than patients in the low-risk group. Subsequently, the risk score was confirmed as an independent prognostic factor by multivariate analysis. Furthermore, by CIBERSORT analysis, we discovered that immune cells, such as regulatory T cells (Tregs), activated memory CD4+ T cells, and gamma delta T cells showed significant differences between the high- and low-risk groups. In addition, we found some interesting associations of our signature with immune checkpoint genes (CD96, TGFBR1, and TIGIT). By analyzing drug sensitivity data in the GDSC database, we were able to identify potential therapeutics for DLBCL patients stratified according to our signature. Conclusions Our study identified and validated a 14-DNA repair-related gene signature for stratification and prognostic prediction of DLBCL patients, which might guide clinical personalization of treatment.