The dorsal cornu ammonis 2 (dCA2) region of the hippocampus enables the discrimination of novel from familiar conspecifics. However, the neural bases for more complex social-spatial episodic memories are unknown. Here we report that the spatial and social contents of an aversive social experience require distinct hippocampal regions. While dorsal CA1 (dCA1) pyramidal neurons mediate the memory of an aversive location, dCA2 pyramidal neurons enable the discrimination of threat-associated (CS+) from safety-associated (CS-) conspecifics in both female and male mice. Silencing dCA2 during encoding or recall trials disrupted social fear discrimination memory, resulting in fear responses toward both the CS+ and CS- mice. Calcium imaging revealed that the aversive experience strengthened and stabilized dCA2 representations of both the CS+ and CS- mice, with the incorporation of an abstract representation of social valence into representations of social identity. Thus, dCA2 contributes to both social novelty detection and the adaptive discrimination of threat-associated from safety-associated individuals during an aversive social episodic experience.