Along with the intensification of global ecological problems, corporate environmental, social, and governance (ESG) issues have attracted extensive attention from the investment community, and solving these issues is crucial for sustainable development. However, little is known about the research on equity structure reform on corporate ESG performance, especially state-owned capital on private firms' ESG performance. To this end, we utilize the panel data of 1,589 privately listed firms in China from 2013 to 2021 to explore the impact of state-owned capital on the ESG performance of private firms. The findings suggest that state-owned capital significantly improves the ESG performance of private firms. In addition, the results of mechanism analysis indicate that state-owned capital stimulates ESG performance through the dual path of improving the mitigation of external financial constraint problems and internal control environment problems. We also find that firms' external environmental shocks enhance the extent to which state capital injection into private firms enhances ESG performance, and these external environmental shocks include the strength of environmental regulation in the region, whether the firms' attribute is that of heavily polluting industries, and the strength of external media attention. In summary, our findings support the conjecture that state capital injection into private firms will be followed by enhanced ESG performance, and the external environment is a factor that influences this process. Our study may provide lessons for the sustainable development of private firms and dig deeper into the internal root causes and external shock factors.