Coordinating competing interests can be difficult. Because law regulates human behavior, it is a candidate mechanism for creating coordination in the face of societal disagreement. We argue that findings from moral psy- chology are necessary to understand why law can effectively resolve co- occurring conflicts related to punishment and group membership. First, we discuss heterogeneity in punitive thought, focusing on punishment within the United States legal system. Though the law exerts a weak influence on punitive ideologies before punishment occurs, we argue that it effectively coordinates perceptions of individuals who have already been punished. Next, we discuss intergroup conflict, which often co-occurs with disagree- ments related to punishment and represents a related domain where coor- dination can be difficult to achieve. Here, we underscore how insights from moral psychology can promote equality via the law. These examples demonstrate how contributions from moral psychology are necessary to understand the connection between social cognition and law.