Drawing from a dataset of companies listed on the A-share market from 2010 to 2022 in China, this study explores how investor–firm interactions on Hudongyi and E-hudong affect corporate ESG performance. The findings demonstrate that interactions between investors and companies significantly enhance the ESG performance of corporations. The impact is particularly pronounced for firms with greater institutional investment, heightened media scrutiny, and those operating in more polluting sectors. We also confirm that ESG-related interactions enhance firms’ ESG performance more significantly than non-ESG-related interactions. Potential mechanisms encompass the “oversight and governance” mechanism and the “reputational compensation” mechanism. Further analysis reveals that investor–firm interactions have a greater positive effect on the S- and G-aspects of ESG. Additionally, we also rule out the “pandering hypothesis”, “noise hypothesis”, and “surplus manipulation hypothesis”, thus ensuring the robustness of the conclusions. The core findings remain consistent, even after conducting various tests for endogeneity and robustness.