We show that judicial independence can reduce local protectionism and foster crossregional economic integration. We exploit a judicial independence reform in China with staggered roll-out since 2014. The reform removed local governments’ control over local courts’ financial and personnel decisions, thereby substantially improving local courts’ independence. Combining novel data on the universes of civil lawsuits and business registration records, we show that local defendants’ rate of winning court cases against non-local plaintiffs declined by 7.0% after the reform. The effect is mainly driven by improvements in the quality of judicial decisions and is more salient for politically connected local defendants. Over time, the reduction in local protectionism encouraged smaller non-local firms to file lawsuits against larger local firms. Using the shareholding network extracted from business registration records, we find that the decline in local protectionism could attract 8.4% more inward investment flows into reformed localities. This has the potential to increase China’s GDP by 2.3% when the judicial independence reform is implemented nationwide.