Studies on the population genetics of Euterpe edulis Mart. have provided valuable insights into the genetic diversity and structure of populations. Nevertheless, the evolution process for this species remains partially unknown. Knowledge about the diversity and genetic structure is essential for the management and conservation of this species. This work intends to understand the population genetics and evolution of E. edulis. For this, 261 individuals from 26 populations were genotyped, and 2227 neutral and 316 outlier SNPs were combined with ecological niche models over the past 130,000 years to describe the genetic diversity and structure of population of this species through time; test if adaptive selection influences this pattern; test for a correlation between genetic diversity and historical climate stability and geographic distance. Our results indicate that natural selection related to environmental stress shaped the spatial pattern of genetic diversity in E. edulis. The SNPs under selection showed the same pattern in structuring the populations as the neutral ones, geographically dividing the Atlantic Forest into north and south. Functional annotation of the SNPs under selection identified resulted in association with defense, stress, and flowering genes. The ecological modeling results showed that the areas suitable for the occurrence retracted in drier periods, and the contemporary distribution of E. edulis has been relatively stable in the southern coastal region of Brazil. The genomic data recover a clear pattern of isolation by distance and resistance. This study contributed to understanding the population genetics and evolutionary history of E. edulis.