This study aims to determine the relationship between judicial protection of intellectual property rights (IPRs), innovation, and firm performance. Using the establishment of intellectual property courts (IPCs) by the Chinese government in Beijing, Shanghai, and Guangzhou in 2014 as a quasi-natural experiment, we build a difference in differences model to assess the impact of legal regulation on firm performance from a judicial perspective. The results show that the IPC reform significantly promotes the growth of firm performance, and this incentive effect is realized through the innovation quality mechanism. For different enterprises, the effect of IPC policy is more evident among firms with strong external funding dependence, large enterprise size, large spillover effects, and state ownership. In addition, we calculated sustainability indicators for firms and found that IPCs increased firms' total factor productivity through quality-based innovation mechanisms. The important contribution of this study is that it fills a research gap in examining the impact of legal regulation on firms from a judicial perspective by identifying the relationship between judicial protection of IPRs, innovation, and business performance. This paper has implications for the promotion of judicial reform in countries with weak IPR systems, for developing countries like China, the judicial protection of IPRs should be increased to provide an institutional environment more conducive to enterprise development.