IntroductionWe test whether identity-based green credit improves or worsens firms’ environmental compliance under discretionary enforcement.MethodsUsing a firm-year panel of 2,376 listed firms, we link banks’ green-credit status to environmental penalty records and estimate fixed-effects models aided by a shift-share instrument, alongside extensive falsification and robustness checks.ResultsRelative to comparable firms, green-credit recipients are 19.7% more likely to receive environmental penalties, with stronger effects among privately owned firms; greater enforcement standardization attenuates this pattern.DiscussionIdentity-based green credit can backfire under discretionary enforcement; performance-based eligibility and more standardized enforcement can mitigate the risk.