Religious rituals are found all over the world. Some cultures engage in extreme religious rituals in which individuals take on forms of bodily harm to demonstrate their devotion. Such rituals entail excessive costs in terms of physical pain and effort, but the equivalent societal benefits remain unclear. The field experiment reported here examined the interplay between extreme rituals and moral behavior. Using a die-roll task to measure honest behavior, we tested whether engaging or observing others engaging in extreme ritual activities affects subsequent moral behavior. Strikingly, the results showed that extreme rituals promote moral behavior among ritual observers, but not among ritual performers. The discussion centres on the moral effects of rituals within the broader social context in which they occur. Extreme religious rituals appear to have a moral cleansing effect on the numerous individuals observing the rituals, which may imply that these rituals evolved to advance and maintain moral societies.