PurposeIn the era of the digital economy, the digital innovation ecosystem is an important vehicle to alleviate enterprises' resource and capability constraints and thus improve their digital innovation performance. Embedding digital innovation ecosystems for survival and development opportunities has become a new strategic choice for enterprises. However, how digital innovation ecosystem embeddedness affects the digital innovation performance of complementary enterprises has not yet been fully revealed. This study examines whether digital innovation ecosystem embeddedness affects the digital innovation performance of complementary enterprises through ambidextrous capabilities (exploration and exploitation) and the moderating role of strategic flexibility.Design/methodology/approachA field survey was conducted in China, collecting survey data from 578 complementary enterprises in advanced manufacturing industries embedded in digital innovation ecosystems. This study applies multiple regression analysis to verify the relevant hypotheses.FindingsThe results confirmed that (1) digital innovation ecosystem embeddedness has a significant positive effect on complementary enterprises' digital innovation performance; (2) Ambidextrous capabilities play a partial mediating role in the relationship between digital innovation ecosystem embeddedness and complementary enterprises' digital innovation performance. (3) Strategic flexibility positively moderates the effect of digital innovation ecosystem embeddedness on ambidextrous capabilities and digital innovation performance.Practical implicationsThe findings, intended to guide enterprises that complement the digital innovation ecosystem to achieve digital innovation and performance improvement, highlight the importance of eco-embedded strategies, ambidextrous capabilities and strategic flexibility.Originality/valueThe finding enriches antecedent research on digital innovation performance and provides practical insights for firms to embed themselves in digital innovation ecosystems to improve performance.