The DMY gene is deleted in all males of the Sanya population (SY-medaka) of the Hainan medaka, Oryzias curvinotus, as recently reported by us. However, due to limited knowledge regarding their population genetic background, the cause of the deletion is yet to be understood. Herein, we resequenced the whole genome of four populations, including SY-medaka. A total of 32,826,105 SNPs were identified and the complete mitochondrial genomes of all individuals were assembled. We found that the genetic differentiation is highest between SY-medaka and the other populations. Further analysis shows that SY-medaka are the most strongly affected by environmental selection. The population history of Oryzias curvinotus also shows that the Sanya population size is at a low level in the context of the last 100,000 years. By combining the divergence time tree with paleogeographic evidence, we show that the SY-medaka migrated from the Eurasian continent. Moreover, we screened some potential genomic regions, and the genes contained in these regions may explain the potential mechanism of the selection process of the Sanya population. In conclusion, our study can provide new clues for the adaptation process of medaka in the new environment of Sanya and the mechanism of male DMY gene deletion.