The fear of sanction or desire for rewards is the most straightforward way that law influences behavior, but it might not always be the most effective. More indirectly, law can change moral attitudes underlying behaviors, and this mechanism is potentially extremely efficient by being self-enforcing. Law can influence moral attitudes by recharacterizing behavior previously thought of as harmless, by signaling moral approval for behaviors previously thought of as outside the domain of morality, or by developing a general reputation for doing what justice requires and by providing high quality treatment to citizens. Laws sometimes affect moral attitudes in the intended ways, but sometimes they do not. We argue that the success of legal regulation in changing moral attitudes will depend on a number of variables. We focus specifically on: 1) whether the regulation aims to change attitudes which are important to individuals’ cultural identities; 2) whether there is underlying dissensus about the behavior or attitude; 3) whether the law is attempting to change the underlying meaning of behaviors, rather than trying to change the behaviors itself. We examine the influence of law through various mechanisms, including physical architecture, social meaning, attitude change, and consensus. Throughout the discussion of these mechanisms, we focus on factors that lead to success, failure, or even perverse effects.