Humans not only value extrinsic monetary rewards but also their own morality and their image in the eyes of others. Yet violating moral norms is frequent, especially when people know that they are not under scrutiny. When moral values and monetary payoffs are at odds, how does the brain weigh the benefits and costs of moral and monetary payoffs? Here, using a neurocomputational model of decision value (DV) and functional (f)MRI, we investigated whether different brain systems are engaged when deciding whether to earn money by contributing to a bad cause and when deciding whether to sacrifice money to contribute to a good cause, both when such choices were made privately or in public. Although similar principles of DV computations were used to solve these dilemmas, they engaged 2 distinct valuation systems. When weighing monetary benefits and moral costs, people were willing to trade their moral values in exchange for money, an effect accompanied by DV computation engaging the anterior insula and the lateral prefrontal cortex (PFC). In contrast, weighing monetary costs against compliance with one's moral values engaged the ventral putamen. Moreover, regardless of the type of dilemma, a brain network including the anterior cingulate cortex (ACC), anterior insula, and the right temporoparietal junction (TJP) was more engaged in public than in private settings. Together, these findings identify how the brain processes three sources of motivation: extrinsic rewards, moral values, and concerns for image.