PurposePrior studies have examined the relationship between tax avoidance and corporate innovation, showing that innovative firms use their intellectual properties and research and development (R&D) activities to avoid taxes. This study aims to investigate the motivation behind tax avoidance practices within innovative firms.Design/methodology/approachThis study uses the Compustat database to collect financial information for US companies, comprising 33,872 firm-year observations from 5,504 non-financial from 2011 to 2021. To ensure robust findings, the authors conducted the Hussman test to compare fixed effects and random effects models, the Breusch-Pagan test for heteroskedasticity and the Koenker and Machado test to assess coefficient consistency across quantiles in quantile regressions (QRs). Based on these tests, the authors used two empirical approaches: a random-effect model to examine the linear relationship between variables and QR to capture potential non-linear relationships and address heteroskedasticity issues.FindingsResults indicate that corporate patent activity facilitates tax avoidance practices; however, not all innovative firms use their intellectual properties (e.g. patents) for this purpose. The association between tax avoidance and innovation is negative at the lowest quantile, suggesting that high innovation output and quality patents can enhance tax avoidance. This is likely because high-quality patents are valuable and generate more profit, increasing income shifted to foreign subsidiaries. In addition, the study found that innovative firms investing more in R&D benefit from tax advantages and pay less taxes than non-innovative firms. Finally, testing for the moderating effect of foreign income showed no impact on the relationship between tax avoidance and corporate innovation. The results are robust for alternative testing and measuring change.Originality/valueTo the best of the authors' knowledge, this is one of the first studies to investigate the incentives that drive innovative firms to avoid taxes.