Landscape heterogeneity and the host plant use are factors suggested to play determinant roles in shaping the evolutionary history of herbivorous insects. However, the role of the reconfiguration of host plants distributions linked to Quaternary climate oscillations as drivers of contemporary population genetic structure is still poorly understood. Here, we formally examine the relative contribution of such factors on intraspecific diversification using the South American cactus moth, Cactoblastis cactorum, an herbivore insect specialized in the use of cacti as host plants. We assessed genomic variation using genome-wide SNPs and mitochondrial data in populations sampled across a broad geographical gradient where moths feed on different cactus species. We integrated demographic simulations and ecological niche modeling into a landscape genomics framework, to test alternative hypotheses of past and current population connectivity for both C. cactorum and its host plants. Regions exhibiting higher genomic diversity were evaluated for congruence with areas where suitable climatic conditions remained stable through time. Our results revealed that past spatial configuration of suitable habitat conditions and shifts of host plants distributions are the factors that better explain the intraspecific diversification. Genomic data also supported the hypothesis that areas of long-term habitat stability served as refugia for C. cactorum, enabling the maintenance of high levels of genetic diversity over time. Overall, our study highlights the importance of integrating inter-specific interactions and their spatio-temporal dynamics to better understand the relative importance of abiotic and biotic factors driving the diversification processes in herbivorous insects with broad geographical and restricted host ranges.