Abstract We examine the impact of having specialized environmental courts (SPECs) on corporate risk‐taking in China. SPECs allow judges and prosecutors to develop environmental expertise and are accountable for environmental violations. Thus, SPECs effectively enforce environmental regulations. Our findings suggest that when a firm is located in an SPEC jurisdiction, it engages in less corporate risk‐taking than an otherwise equivalent firm located in a non‐SPEC jurisdiction. The results are more pronounced for firms that receive large government environmental subsidies and that are state‐owned. Additional analysis suggests that firms make more environmental investments when located in an SPEC jurisdiction.