Corporate donations are frequently perceived as strategic instruments for accruing political advantages. However, when the institutional environment that enables such reciprocal exchanges changes, how should firms adjust their donation strategies? While prior research robustly links political connections to higher corporate giving, causal evidence on how firms adjust their donations when the institutional basis for this exchange is removed remains scarce. Using 13,532 firm-year observations from Chinese A-share listed firms over 2015–2022, we exploit China's transfer of social insurance collection authority from local governments to the national tax bureau as a quasi-natural experiment. We find that the reform reduces corporate donations by approximately 23.6%, operating through two channels: weakened political connections (motivation) and tightened financing constraints (ability), with effects concentrated in strongly regulated industries, highly competitive markets, and among highly leveraged firms. Further analysis suggests the contraction is concentrated in strategic rather than altruistic giving: relief-oriented donations show no significant decline, indicating the reform curbed rent-seeking without impairing genuine philanthropy. These findings offer causal evidence on the institutional foundations of corporate giving and policy insights for comparable developing economies.