Leading countries have made official green commitments on environmental issues. Previous studies show that the government can influence energy use by formulating public policies or changing public expenditure, but it is not clear whether the Government's Green Commitment (GGC) could promote energy conservation. Therefore, this paper uses the provincial data of China from 2006 to 2019 to test the role of GGC in energy saving. Our research results show that the GGC alone cannot reduce energy use unless it is supported by public spending. Further, we divide public expenditure into public investment and public services, and the results show that public investment helps to achieve GGC's goals, while public service does not. We conclude that the GGC is a valuable tool in energy governance, but it does work with public investment, which can turn the GGC into a credible commitment and thereby serve as a green-oriented guide to sustainable development.