Abstract:The inherent tendency of enterprises to externalize environmental costs and the public goods attribute of the ecological environment determine that it is difficult to achieve sustainable development goals merely by relying on corporate self-discipline. Through legal means, the specialization of environmental judicature converts social costs into rigid constraints on corporate decision-making, thus offering an institutional solution to break through the dilemma of green transformation. Taking the establishment of environmental courts as a quasi-natural experiment, this paper employs the data of A-share listed companies from 2011 to 2023 and constructs a difference-in-differences model to investigate and verify the action path of the judicial forcing mechanism on corporate sustainable development.The research conclusions are as follows:①The establishment of environmental courts can significantly boost corporate ESG performance, and this effect features strong persistence. ②The improvement effect of environmental judicial reform on corporate ESG performance is more prominent among enterprises in heavily polluting industries, state-owned enterprises, as well as enterprises located in regions with higher judicial independence and higher public attention to environmental issues. ③Mechanism tests reveal that the establishment of environmental courts directly improves regional environmental judicial efficiency, forces enterprises to pursue green transformation from the source, enhances their sustainable development capacity, and consequently optimizes corporate ESG performance. ④Sub-dimensional effect tests show that the positive influence of environmental courts on corporate ESG performance derives from the all-round promotion of corporate environmental (E), social (S) and governance (G) performance. Comparatively speaking, the positive impact on the environmental (E) dimension plays a leading role, the promotion effect on the social (S) dimension is relatively weak, while the impact on the governance (G) dimension is less persistent and presents a certain time lag.This study effectively supplements the theories of environmental regulation, and also provides micro empirical evidence for perfecting the construction of ecological civilization institutional system.