Humans use punishment and reward to modify each others' behavior, and we also learn from others' rewards and punishments. This simple dynamic animates much of our moral psychology, and I explore two of its consequences in detail. First, human punishment should be adapted to the contours and constraints of human learning. This can explain a peculiar feature of our moral judgments that philosophers call "moral luck": The fact that accidental outcomes play a large role in determining punishment. Second, the architecture of human learning should dictate when and how we choose to harm others. I borrow from current neurobiological models of reinforcement learning to understand why we deem some harmful actions impermissible and others permissible. These case studies illustrate the role that learning systems play as a basic organizing principle in the moral domain.