Human-mediated changes in landscapes can facilitate niche expansion and accelerate the adaptation of insect species. The interaction between the evolutionary history of the sugarcane borer, Diatraea saccharalis Fabricius, and historical and modern agricultural activity in Brazil shaped its spatial genetic structure, facilitating ecological divergence and incipient host shifting. Based on microsatellite data, STRUCTURE analyses identified two (K = 2) and three (K = 3) significant genetic clusters that corresponded to: (a) a strong signal of spatial genetic structure and, (b) a cryptic signal of host differentiation. We inferred that K = 2 reflects the footprint of agricultural activity, such as expansion of crop production (sugarcane and maize), unintentional dispersion of pests, and management practices. In contrast, K = 3 indicated incipient host differentiation between larvae collected from sugarcane or maize. Our estimates of population size changes indicated that a historical bottleneck was associated with a reduction of sugarcane production ≈200 years ago. However, a more recent population expansion was detected (>1950s), associated with agricultural expansion of large crop production into previously unfarmed land. Partial Mantel tests supported our hypothesis of incipient host adaptation, and identified isolation-by-environment (e.g., host plant) in São Paulo and Minas Gerais states, where sugarcane has been traditionally produced in Brazil. The impact of agricultural production on D. saccharalis may continue, as the current population structure may hinder the efficacy of refuge plants in delaying insect resistance evolution to Bt toxin.