In the academic community, the impact of digitalization on green technology innovation in the supply chain has not been fully understood. Drawing on stakeholder theory and limited attention theory, we conjecture the effects and behavioral boundaries of digitalization of upstream and downstream firms on green technology innovation of focal firm in the supply chain, and consider how government attention and market attention affect their mediating paths. Using the supply chain data of Chinese A-share listed companies from 2010 to 2022, we find that the digitalization of upstream and downstream firms has a U-shaped nonlinear effect on focal firm's green technology innovation in the supply chain through the U-shaped intermediary path of environmentalism behavior and the inverted U-shaped intermediary path of opportunism behavior. In addition, our results reveal that government attention and market attention compress the space for non-linear relationships. These results enrich the relevant research on green technology innovation in the supply chain from the perspective of stakeholder digitalization. It not only provides a dynamic analysis perspective to explain the inconsistent spillover effects of digitization, but also provides important insights on addressing the opportunities and challenges which digitalization brings to the green sustainability in the supply chain.