This paper presents a novel approach of population genetics together with environmental and biogeographic data leading to inferences for ecological niche modelling. We used hierarchical lineages obtained using the nested cladistic analysis (NCA) of the mitochondrial DNA (mtDNA) haplotypes of the bark beetle species Tomicus destruens, for modelling the distribution by maximum entropy using environmental and host variables along the whole Mediterranean Basin. The identity and similarity tests were checked in the intraspecific lineages (NCA clades and haplotypes) in order to determine a shift or conservatism niche between them. Also, four indices from nine geographical areas in the Mediterranean Basin were calculated to assess the variability of environmental factors shaping the distribution of haplotype diversity on a large geographic scale. The ecological models developed indicate that minority eastern mtDNA lineages of T. destruens differ in their potential ecological niche according to their relation to extreme climatic variables. By contrast, the most widespread western lineages display a close relationship with their Pinus host tree. Also, higher levels of exclusive and endemic haplotypes were predicted in areas with high temperature variability in the Mediterranean wet period. The eastern group niche seems to be included in part of the range of the ecological space of the two major western clades. This result suggests that a niche shift might have started, being still an early relationship with its host tree Pinus brutia. Alternatively, the temperature variability in the wettest period appears to be related to a high proportion of endemic haplotypes of T. destruens, possibly by involving a balance between the length of the flight reproductive period of T. destruens and the status of the host tree vigour and growth stage. This study illustrates a good example of the benefits that ecological niche modelling provides to understand population genetic and phylogeographic patterns.