This study examines the impact of media attention on corporate green drift behavior and the mediating role of executive risk preferences in it. This study examines the green innovation of firms using A-share listed companies from 2011 to 2021 as the research sample. It is empirically tested that media attention significantly inhibits corporate greenwashing behavior, and executive risk preferences positively reinforce this inhibitory effect. The findings provide a new perspective for preventing corporate greenwash initiatives, which, together with a moderate increase in executive risk-taking, has practical implications for promoting the high-quality development of corporate green ecological civilization.