PurposeThis paper aims to identify the effect of environmental management systems (EMSs), commitment to stakeholders and gender diversity on corporate environmental performance (CEP) and the extent to which an economic crisis moderates these relationships.Design/methodology/approachA regression analysis was conducted on a sample of 14,217 observations from 1,933 firms from 26 countries from 2002 to 2010. The estimator used is ordinary least squares with heteroscedastic panel-corrected standard errors (PCSEs), which allows us to obtain consistent results in the presence of heteroscedasticity and autocorrelation.FindingsThe results show that EMSs and stakeholder engagement are mechanisms that drive CEP but lose their effectiveness in times of crisis. However, the presence of women on boards has a positive effect on CEP that is not affected by an economic crisis.Research limitations/implicationsThe study has some limitations that could be addressed in the future. We present board gender diversity as a governance mechanism because its role is strongly related to non-financial performance. Future studies could focus on other corporate governance mechanisms, such as the presence of institutional or long-term investors. In addition, other mechanisms could be found that can counteract poor environmental performance in times of crisis. Finally, it might be useful to contrast these results with the crisis generated by the coronavirus pandemic.Practical implicationsThe results obtained have important practical implications at the corporate and institutional levels. At the corporate level, they highlight, as essential contributions, that environmental management systems and stakeholder orientation are not effective in times of economic crisis, except for with the presence of women on the board.Social implicationsFollowing the crisis, the European Commission has promoted gender diversity on boards as a mechanism to improve the governance of entities – improving, among other aspects, sustainability. In this sense, another one of the practical implications of the study is support for the policies that the European Union has implemented over the last two decades.Originality/valueThe paper analyses how a crisis affects the moral and cultural institutional mechanisms that promote CEP. Gender diversity on the board of directors not only promotes environmental performance but also appears to be a governance mechanism that ensures this performance in times of crisis when the other mechanisms lose their effectiveness. The study proposes specific policies that help maintain environmental performance in an economic crisis.