This study empirically investigates the role of judicial independence in facilitating the entry of foreign-invested enterprises in China. Utilizing the judicial independence reform since 2014 in China as a quasi-experiment, we conduct a difference-in-difference (DID) strategy to estimate the effects of judicial independence on the influx of foreign investment and the underlying mechanisms. The findings suggest that bolstering judicial independence can significantly promote the entry of foreign investment. The yearly numbers of newly-registered foreign-invested enterprises increase by around 17.8 % in pilot cities. Judicial independence enhances the quality of adjudication that amplifying the protection of corporate property rights, consequently attracting foreign investment. Further analysis shows that bolstering judicial independence also causes structural change of foreign investment, including an increase in the proportion of small and medium-sized, sole proprietorship, high-tech enterprises, and enterprises from developed countries.