As an important measure to achieve high‐quality economic development in China, the implementation of low‐carbon city pilot policy (LCCP) will inevitably have an impact on enterprises’ environmental protection behavior, but the empirical evidence in this field is limited. Therefore, based on the data of Chinese A‐share listed industrial enterprises in Shanghai and Shenzhen from 2008 to 2020, this paper empirically tests the impact of LCCP on corporate environmental performance (EP) and its mechanism of action by using the multiperiod difference‐in‐difference (DID) method. The results show that (1) the implementation of LCCP has significantly improved EP, and after a series of necessary tests such as parallel trend and placebo, the conclusion remains robust. (2) LCCP promotes enterprises to improve their EP mainly through the pressure of environmental supervision, financing constraints, and market competition. (3) The policy effect of LCCP varies with the nature of enterprise property rights, pollution attributes, and technical level. State‐owned enterprises, heavily polluting enterprises, and high‐tech enterprises respond more positively to LCCP, and the effect of EP improvement affected by the policy is more obvious. Further analysis shows that facing the pressure of environmental policy, state‐owned enterprises mainly deal with it through two methods: increasing environmental protection investment and strengthening green innovation; heavy‐polluting enterprises tend to increase investment in environmental protection; high‐tech enterprises mainly benefit from the improvement of the green innovation level. Our findings have important policy implications for improving LCCP to achieve high‐quality economic development based on the improvement of EP.