Cooperative social behaviors, such as parental care, have long been hypothesized to relax selection leading to the accumulation of genetic variation in populations. Although the idea has been discussed for decades, there has been relatively little experimental work to investigate how social behavior contributes to genetic variation in populations. Here, we investigate how parental care can shape molecular genetic variation in the subsocial insect, Nicrophorus vespilloides. Using whole-genome sequencing of populations that had evolved in the presence or absence of parental care for 30 generations, we show that parental care maintains levels of standing genetic variation. In contrast, under a harsh environment without care, strong directional selection caused a reduction in genetic variation. Furthermore, we show that adaptation to the loss of care is associated with genetic divergence between populations at loci related to stress, morphological development, and transcriptional regulation. These data reveal how social behavior is linked to the genetic processes that shape and maintain genetic diversity within populations, and provides rare empirical evidence for an old hypothesis.