Enterprises have emerged as primary actors in environmental protection owing to the increasingly severe global energy crisis and environmental pollution. Companies can reduce operational costs, achieve environmental social responsibility, and enhance their green image by increasing their green investments. Simultaneously, companies can gain support from investors, governments, and other stakeholders for improving their sustainable development. This study uses fixed-effects regression models to analyze the impact of green investment on corporate sustainability in Chinese listed companies for the period from 2010 to 2020. It also investigates the moderating effects of government environmental subsidies, investor attention, and executives’ overseas experience on the relationship between green investment and corporate sustainability. The data used in this study were not only obtained from the China Stock Market & Accounting Research (CSMAR) database but also collected manually from the annual reports and social responsibility reports of listed companies using web crawler technology. And the robustness test was conducted by removing the epidemic year and replacing the range of independent variables and 2SLs. This study uses Stata 17.0 to filter and process the data. The results show that green investment can significantly improve the sustainability of enterprises; besides, government subsidies, investors’ attention, and executives’ overseas experience all play a positive role in moderating the positive effect of green investment on the sustainable development of enterprises. Further analysis of this study finds that the moderating effect is more significant in non-state-owned enterprises and highly polluting enterprises. This study contributes to broadening the theory related to the green development of enterprises and environmental governance and provides theoretical support for enterprises to make green investment decisions and green transformations.