Corporate green innovation is a critical foundation for promoting resource conservation, pollution reduction, and energy efficiency, thereby contributing to sustainable economic development. In China, under the performance-based promotion mechanism of local officials, there exists a complex interaction between local government economic growth targets and corporate green innovation behavior. This paper aims to explore the impact of excessively high economic growth targets set by local governments on corporate green innovation, the mediating role of asset-based investments, and the moderating effect of environmental constraint targets. The findings suggest that economic growth target constraints suppress green innovation in heavy-polluting enterprises, primarily by expanding asset-based investments, which crowd out investments in green innovation, thereby inhibiting corporate green innovation. However, environmental constraint targets alleviate the suppressive effect of economic growth target constraints on green innovation in these enterprises. The results of the heterogeneity test indicate that the inhibitory effect of economic growth target constraints on green innovation in heavily polluting firms is stronger in regions with stricter economic growth constraints, in state-owned enterprises, and in regions with stronger motivation for the promotion of local officials. These results are consistent with the robustness check results. This study not only contributes to the understanding of how government policies affect firms’ green innovation behaviors but also has important implications for achieving economically, socially, and environmentally sustainable development.