As an important indicator of a firm's commitment to its stakeholders, ESG's impact on the intra-firm pay gap remains underexplored. This study examines the relationship between ESG performance and the intra-firm pay gap using a sample of Chinese-listed companies from 2009 to 2022. We find that high ESG performance is significantly associated with the widening of the intra-firm pay gap. Further analysis indicates the increasing gap mainly comes from escalating management compensation, while the rank-and-file employees' salaries remain unchanged. We explore three mechanisms behind the above relationship: reducing agency costs, enhancing managerial capabilities, and improving managerial reputation. Furthermore, our analyses suggest that the effect of ESG performance on the intra-firm pay gap is intensified when the majority shareholder wields greater influence and rank-and-file employees have less bargaining power. This study has essential policy implications for understanding the impact of ESG practices on income distribution within firms.