ABSTRACT Purpose This study aims to examine the effects of eco-innovation on the sustainability of manufacturing firms. It is anchored on the resource-based view (RBV) and designs a moderated mediating model to explore how eco-innovation impacts firm sustainability, particularly in the context of green business-to-business (B2B) marketing and consumer behavior. Methodology/approach Data were collected from 174 manufacturing firms in Nigeria. The study employs a quantitative approach, analyzing the relationships between eco-innovation, firm sustainability, green B2B marketing, and consumer behavior using statistical methods to test the proposed moderated mediating model. Findings Eco-innovation positively relates to firm sustainability. Consumer behavior positively mediates the relationship between eco-innovation and firm sustainability. Heterogeneity exists within manufacturing firms regarding eco-innovation practices and their impact on sustainability. Firms with high green indicators are more likely to adopt green B2B marketing strategies, leveraging information networks and innovation activities to enhance eco-innovation performance. Research implications This study advances marketing and environmental research by demonstrating the importance of eco-innovation in promoting firm sustainability. It provides insights into the conditions under which eco-innovation activities are most effective, emphasizing the roles of green B2B marketing and consumer behavior. Practical implications Manufacturing firms should focus on developing and implementing eco-innovation strategies to enhance their sustainability performance. Additionally, firms should consider the importance of green B2B marketing and consumer behavior in mediating and moderating the impact of eco-innovation on sustainability. These practices can lead to better information networks and innovation activities, fostering a more sustainable business environment. Originality/value/contribution This study contributes to the literature by revealing the critical role of eco-innovation in enhancing firm sustainability. It highlights the importance of green B2B marketing and consumer behavior in the relationship between eco-innovation and firm sustainability. The findings provide a nuanced understanding of how eco-innovation can be leveraged to achieve better sustainability outcomes in the manufacturing sector.