This study examines the relationship between the external pay gap of research and development (R&D) personnel and the total factor productivity (TFP) of enterprises. The results show that the external pay gap of R&D personnel significantly improves the enterprises' TFP, while innovation output, innovation efficiency, and human capital quality play mediating roles in the effect. Furthermore, we find that the promotion effect of the external pay gap of R&D personnel is more significant in non-state-owned firms, firms in industries with high competition, and firms in regions with high economic development. In addition, the internal pay gap has a moderating effect on the effect.