Self-serving impulses and moral considerations often act as two opposing forces that govern our everyday behavior. But how does the brain decide which one wins?