1. In dragonflies, species richness shows a marked variation between lineages. Species diversification in this lineage has been linked with habitat variation, but the role of other factors, such as wing pigmentation, arguably one of the most conspicuous traits in dragonflies, have not yet been explored.2. In this study, using novel methodology that takes into account state-dependent speciation, extinction models, and ancestral reconstruction, we investigate the role of wing pigmentation (present/absent) in conjunction with habitat variation (lentic/ lotic), to unveil the drivers of species diversification in dragonflies.3. We found that wing pigmentation is associated with a marginal increase in diversification compared to unpigmented lineages. Inhabiting a lentic habitat is associated with higher diversification rates. When considering both factors in a single model, lentic environments are associated with higher diversification compared to lotic habitats regardless of pigmentation status. In contrast with results across the whole tree, in lotic environments, wing pigmentation is associated with marginally higher diversification rates compared to non-pigmented species. Ancestral state reconstruction revealed that the last common ancestor of dragonflies was most likely non-pigmented and lived in lotic habitats. 4. Our study provides evidence that wing pigmentation in conjunction with habitat has an important influence on dragonflies species diversification, with habitat being a better differentiator than wing pigmentation.