Ecological divergence in the face of gene flow has recently become implicated as a potentially important cause of speciation and adaptive radiation. Here, we develop a genomic approach to test for divergent selection in sympatric host races of the larch budmoth Zeiraphera diniana (Lepidoptera: Tortricidae). We analysed hundreds of amplified fragment length polymorphism markers in 92 individuals in sympatric and allopatric populations, and in two backcross broods used to map the markers to individual chromosomes. The results directly confirm the existence of natural hybridization and demonstrate strong heterogeneity between chromosomes in terms of molecular divergence between host races (the average level of divergence was FST=0.216). However, genomic heterogeneity was not found when we analysed divergence between geographically separated populations of the same host race. We conclude that the variance of the level of sympatric divergence among chromosomes is the footprint of divergent selection acting on a few linkage groups, combined with appreciable gene flow that homogenizes between‐race variation at the remaining linkage groups. These results, coupled with other recent multilocus analyses of sister species pairs, demonstrate that selection‐driven sympatric phase of genetic divergence in the presence of gene flow is a likely feature of speciation.