Using a sample of 11,357 firm-year observations from the Chinese stock market for the period of 2001-2011, we investigate whether and how religion can mitigate earnings management. Specifically, based on geographic-proximity-based religion variables, we provide strong and robust evidence to show that religion is significantly negatively associated with the extent of earnings management, suggesting that religion can serve as a set of social norms to mitigate corporate unethical behavior such as earnings management. Our findings also reveal that the negative association between religion and earnings management is less pronounced for firms with closer distance to the regulatory centers than for their counterparts, implying the substitutive effects between religion and the distance to regulators (the proxy for regulatory intensity) on mitigating earnings management. The above results are robust to different measures of earnings management, various religion variables, and a variety of sensitivity tests.