Whilst genes can drive social traits, social traits themselves can create and maintain genetic variation in populations. The resulting underlying genetic variation can shape how individuals respond to challenges (e.g., stress, undernutrition) and/or predict how rapidly populations adapt to changing environments (e.g, climate change, habitat destruction). Here, we investigate how a social behaviour, parental care, can shape molecular genetic variation in the subsocial insect Nicrophorus vespilloides. Using whole genome sequencing of populations that have evolved in the presence or absence of parental care for 30 generations, we show that parental care can increase levels of standing genetic variation. In contrast, under a harsh environment without care, strong directional selection causes 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 shed light on the genetic processes that shape and maintain genetic diversity in response to parental care within populations and the mechanisms of adaptation to stressors in the face of the extreme loss of care.