The time spent outdoors and exposure to bright sunlight have been reported to play important roles in preventing myopia progression. Myopia prevalence is generally low in Europe, and we hypothesized that local adaptation of ancestors in insufficient sunlight regions might underlie this low prevalence in Europeans. To verify this conjecture and understand how ancestry adaptation influenced on the diversity of myopia genetic background, polygenic risk scores (PRS) was calculated and revealed that the genetic risk of myopia increased as latitude decreased in the 1000 genome projects (1KGP) EUR, and we further determined selection signatures near the rhodopsin (RHO) coding region in 1KGP Finnish. The derived allele frequencies of identified loci correlated with sunshine duration worldwide, and the allele age was estimated to be ~20,000 years, coincidently after the divergence of Europeans and East Asians. TSPAN10 (rs9747347) is significantly associated with both myopia and pigmentation in Europeans, and we found selection favored the myopia risk allele in EUR. Haplotype comparison highlighted the divergence between EAS and EUR in RHO and pigmentation-associated loci, and the frequency diversity in Admixed American (AMR) of these loci was found to originate from recent admixture and local adaptation. We concluded that local adaptation played a role in myopia prevalence deviation, and selective pressure in the myopia-associated loci may originate from adaptation to sunlight environments rather than myopia itself. These findings reveal traces of evolution history of myopia's genetic background, providing a new aspect of understanding the patterns and diversity of myopia prevalence.