Genomewide markers enable us to study genetic differentiation within a species and the factors underlying it at a much higher resolution than before, which advances our understanding of adaptation in organisms. We investigated genomic divergence in Metrosideros polymorpha, a woody species that occupies a wide range of ecological habitats across the Hawaiian Islands and shows remarkable phenotypic variation. Using 1659 single nucleotide polymorphism (SNP) markers annotated with the genome assembly, we examined the population genetic structure and demographic history of nine populations across five elevations and two ages of substrates on Mauna Loa, the island of Hawaii. The nine populations were differentiated into two genetic clusters distributed on the lower and higher elevations and were largely admixed on the middle elevation. Demographic modelling revealed that the two genetic clusters have been maintained in the face of gene flow, and the effective population size of the high-altitude cluster was much smaller. A FST -based outlier search among the 1659 SNPs revealed that 34 SNPs (2.05%) were likely to be under divergent selection and the allele frequencies of 21 of them were associated with environmental changes along elevations, such as temperature and precipitation. This study shows a genomic mosaic of M. polymorpha, in which contrasting divergence patterns were found. While most genomic polymorphisms were shared among populations, a small fraction of the genome was significantly differentiated between populations in diverse environments and could be responsible for the dramatic adaptation to a wide range of environments.