Ecological divergence in a species provides a valuable opportunity to study the early stages of speciation. We focused on Metrosideros polymorpha, a unique example of the incipient radiation of woody species, to examine how an ecological divergence continues in the face of gene flow. We analyzed the whole genomes of 70 plants collected throughout the island of Hawaii, which is the youngest island with the highest altitude in the archipelago and encompasses a wide range of environments. The continuous M. polymorpha forest stands on the island of Hawaii were differentiated into three genetic clusters, each of which grows in a distinctive environment and includes substantial genetic and phenotypic diversity. The three genetic clusters showed signatures of selection in genomic regions encompassing genes relevant to environmental adaptations, including genes associated with light utilization, oxidative stress, and leaf senescence, which are likely associated with the ecological differentiation of the species. Our demographic modeling suggested that the glaberrima cluster in wet environments maintained a relatively large population size and two clusters split: polymorpha in the subalpine zone and incana in dry and hot conditions. This ecological divergence possibly began before the species colonized the island of Hawaii. Interestingly, the three clusters recovered genetic connectivity coincidentally with a recent population bottleneck, in line with the weak reproductive isolation observed in the species. This study highlights that the degree of genetic differentiation between ecologically-diverged populations can vary depending on the strength of natural selection in the very early phases of speciation.