Ecological divergence alone can prevent the majority of gene flow in the absence of other forms of reproductive isolation. Although the importance of ecological divergence in promoting reproductive isolation has been broadly recognized, its net impact on speciation has rarely been estimated in the wild. The phytophagous ladybird beetle Henosepilachna diekei Jadwiszczak & Wegrzynowicz includes two sympatric host races that are reproductively isolated solely by extreme specialization to either of the host plants Mikania micrantha Kunth (Asteraceae) or Leucas lavandulifolia Sm. (Lamiaceae) in West Java, Indonesia. To investigate the impact of differential host use as an isolating barrier, we carried out adult host acceptance tests and molecular population genetic analyses based on mitochondrial ND2 and nucleic ITS2 gene sequences using 13 wild populations of the host races, including four sympatric population pairs. Almost all individuals of these host races persistently accepted only the original host plant. We detected restricted but a degree of gene flow between these host races. A migration event occurred only in very recent time compared to their divergence time, indicating recent secondary contact of these host races in the surveyed area. These results reveal the remarkably large impact of host‐plant shift over almost the entire process of speciation and illustrate that ecological divergence has been maintained even under the presence of a certain degree of gene flow.