DNA repair has been hypothesized to be a longevity determinant, but the evidence for it is based largely on accelerated aging phenotypes of DNA repair mutants. Here, using a panel of 18 rodent species with diverse lifespans, we show that more robust DNA double-strand break (DSB) repair, but not nucleotide excision repair (NER), coevolves with longevity. Evolution of NER, unlike DSB, is shaped primarily by sunlight exposure. We further show that the capacity of the SIRT6 protein to promote DSB repair accounts for a major part of the variation in DSB repair efficacy between short- and long-lived species. We dissected the molecular differences between a weak (mouse) and a strong (beaver) SIRT6 protein and identified five amino acid residues that are fully responsible for their differential activities. Our findings demonstrate that DSB repair and SIRT6 have been optimized during the evolution of longevity, which provides new targets for anti-aging interventions.