PurposeThe aim of this study is to discuss the idea that the legal cost of environmental violations, along with reputational concerns, may persuade firms to generate more green patents.Design/methodology/approachThis study examines the relationship between firms generating green patents and environmental violations. The authors show the green innovation trend over the past two decades and explore the potential motivations behind it. In addition, the authors investigate the impact of regulatory actions, such as governmental finds, on green innovation.FindingsThe authors find that firms that commit environmental violations switch to producing green patents in the long-run. The authors also document that market reaction following environmental offenses is negative for firms with a high ratio of green patents in their portfolio.Originality/valueThis study explores innovation. The authors investigate the literature and trends of green innovation over the past 20 years. The authors also find that green innovation is growing at a relatively slow rate. Overall, this study highlights the importance of green innovation and firms’ response to corporate wrongdoing.