Adaptation to different environments can promote population divergence via natural selection even in the presence of gene flow - a phenomenon that typically occurs during ecological speciation. To elucidate how natural selection promotes and maintains population divergence during speciation, we investigated the population genetic structure, degree of gene flow and heterogeneous genomic divergence in three closely related Japanese phytophagous ladybird beetles: Henosepilachna pustulosa, H. niponica and H. yasutomii. These species act as a generalist, a wild thistle (Cirsium spp.) specialist and a blue cohosh (Caulophyllum robustum) specialist, respectively, and their ranges differ accordingly. The two specialist species widely co-occur but are reproductively isolated solely due to their high specialization to a particular host plant. Genomewide amplified fragment-length polymorphism (AFLP) markers and mitochondrial cytochrome c oxidase subunit I (COI) gene sequences demonstrated obvious genomewide divergence associated with both geographic distance and ecological divergence. However, a hybridization assessment for both AFLP loci and the mitochondrial sequences revealed a certain degree of unidirectional gene flow between the two sympatric specialist species. Principal coordinates analysis (PCoA) based on all of the variable AFLP loci demonstrated that there are genetic similarities between populations from adjacent localities irrespective of the species (i.e. host range). However, a further comparative genome scan identified a few fractions of loci representing approximately 1% of all loci as different host-associated outliers. These results suggest that these three species had a complex origin, which could be obscured by current gene flow, and that ecological divergence can be maintained with only a small fraction of the genome is related to different host use even when there is a certain degree of gene flow between sympatric species pairs.