Empathy, the ability to share another individual's emotional state and/or experience, has been suggested to be a source of prosocial motivation by attributing negative value to actions that harm others. The neural underpinnings and evolution of such harm aversion remain poorly understood. Here, we characterize an animal model of harm aversion in which a rat can choose between two levers providing equal amounts of food but one additionally delivering a footshock to a neighboring rat. We find that independently of sex and familiarity, rats reduce their usage of the preferred lever when it causes harm to a conspecific, displaying an individually varying degree of harm aversion. Prior experience with pain increases this effect. In additional experiments, we show that rats reduce the usage of the harm-inducing lever when it delivers twice, but not thrice, the number of pellets than the no-harm lever, setting boundaries on the magnitude of harm aversion. Finally, we show that pharmacological deactivation of the anterior cingulate cortex, a region we have shown to be essential for emotional contagion, reduces harm aversion while leaving behavioral flexibility unaffected. This model of harm aversion might help shed light onto the neural basis of psychiatric disorders characterized by reduced harm aversion, including psychopathy and conduct disorders with reduced empathy, and provides an assay for the development of pharmacological treatments of such disorders. VIDEO ABSTRACT.