Data element marketization promotes the circulation and trading of data and is a key measure to drive the development of the digital economy. This study focuses on the quasi-natural experiment of data trading platform establishment. It investigates how data element marketization influences green innovation in enterprises, using a sample of A-share listed firms from Shanghai and Shenzhen between 2011 and 2022. The study reveals that data element marketization significantly boosts the green innovation of enterprises. This conclusion remains valid after various robustness tests. Heterogeneity analysis indicates that this positive impact is particularly pronounced among non-nationalized and small-scale enterprises, those in high-tech and non-heavily polluting industries, as well as in highly market-oriented and eastern regions. Mechanism analysis shows that data element marketization fosters green innovation by alleviating financial constraints and facilitating digital transformation. The moderating effect suggests that government subsidies can positively moderate the impact of data element marketization on enterprises’ green innovation. This study explores the crucial role that data element marketization plays in advancing the green innovation of enterprises and provides a useful reference for optimizing the allocation of data element marketization and giving full play to the green innovation effect of data element marketization.