Universal moral codes prohibit harming others for personal gain. Previous work has identified brain networks and neuromodulator systems involved in moral decision-making, but how these systems compute and shape moral values remains unknown. Here I will describe a novel experimental framework for examining the neurocomputational basis of moral decisions in humans. We invite participants to trade off profits for themselves against pain for either themselves or another person, and build computational models to quantify the relative values they ascribe to pain for themselves and others. Across several experiments we find that most people would rather harm themselves than a stranger for profit. Neuroimaging reveals that these moral preferences are associated with reduced sensitivity to profits in the striatum. Pharmacological studies show that serotonin and dopamine play distinct roles in shaping moral preferences. These findings have have implications for potential treatments of social dysfunction that is a common feature as well as a risk factor for many psychiatric disorders.