This study explores the influence of gender role attitudes on the emergence of the gender wage gap in China, using the 2014, 2016, and 2018 data from the China Family Panel Studies and decomposition methods. Empirical results reveal that gender role attitudes significantly affect the gender wage gap in China and that the negative effect of inegalitarian gender role attitudes on wages is greater for women than for men. Both gender differences in the proportion of workers with inegalitarian gender role attitudes (endowment effect) and gender disparity in return to the gender role attitudes (return effect) contribute to the gender wage gap. Notably, the return effect outweighs the endowment effect. Furthermore, the effect of gender role attitudes on the formation of gender wage gaps differs across heterogeneous groups: the return effect is larger for urban workers or middle-aged and older generations compared to their rural counterparts or younger generations.