Environmental protection and social obligation fulfillment have become hot subjects as the "dual carbon" approach has been developed and deepened. The ESG system is consistent with China’s current policies, abandoning the traditional business philosophy of economic supremacy in favor of comprehensively measuring corporate social responsibility and sustainable development capability across three dimensions: environmental (E), social (S), and corporate governance (G), which receive widespread attention from all sectors of society. Based on observational data from A-share listed businesses in Shanghai and Shenzhen from 2011 to 2020, this study empirically evaluates the influence and mechanism of ESG on government subsidies. The research results indicate that enterprises can receive more government subsidies by improving ESG performance. Mechanism analysis found that corporate transparency plays a positive mediating role in the process of ESG affecting government subsidies. Further research on political affiliation and property rights has found that companies without political affiliation are more inclined to receive more government subsidies by improving ESG performance, and the impact of political affiliation and ESG performance on government subsidies is mutually complementary. Enterprises with different property rights have different strengths of motivation to increase government subsidies by improving ESG performance. State owned enterprises (excluding central enterprises) are the strongest, followed by non-state-owned enterprises, and central enterprises are the weakest. Therefore, enterprises should be further encouraged to strengthen ESG construction, improve the quality of ESG information disclosure, improve resource allocation efficiency, and promote high-quality development of enterprises.