In many species, adults will care for young offspring that are not their own, a phenomenon called alloparenting. However, most nonparental adults experience an initial aversion to newborns, which must be overcome before a robust display of parental-like behaviors can begin. To capture neurogenomic events underlying this dramatic behavioral transition, we analyzed brain gene expression and chromatin profiles of virgin female mice co-housed with mothers during pregnancy and after birth. After an initial display of agonistic behaviors and a surge of defense-related gene expression, we observed a dramatic shift in the chromatin landscape specifically in amygdala, accompanied by a dampening of the defense-related genes. This shift coincided with the emergence of behaviors and gene expression classically associated with maternal care. The results reveal the outlines of a neurogenomic program associated with this dramatic aversive-to-affiliative behavioral switch, and suggest molecular networks that may be relevant to human postpartum mental health.