Crop wild relatives provide a valuable resource for improving crops. They possess desirable traits that confer resilience to various environmental stresses. To fully utilize crop wild relatives in breeding and conservation programs, it is important to understand the genetic basis of their adaptation. Landscape genomics associates environments with genomic variation and allows for examining the genetic basis of adaptation. In this study, we applied landscape genomics to examine the differences in allele frequency of 15,416 Single Nucleotide Polymorphisms (SNPs) among 153 accessions of wild eggplant relatives from Africa, the principal hot spot of these wild relatives. Further, we explored the correlation between these variations and the bio-climatic and soil conditions at their collection sites. Our results showed that the environment has a greater impact on the genetic variation in the eggplant wild relative populations compared to the geographical distances between collection sites while controlling for population structure. These findings indicate the relevance of the environment in shaping genetic variation in eggplant relatives over time. We detected 396 candidate SNPs associated with ten environmental factors by applying four genotype-environment association methods. Some of these SNPs signal genes involved in pathways that help with adaptation to environmental stresses such as drought, heat, cold, salinity, pests, and diseases. These candidate SNPs will be useful for marker-assisted improvement and characterizing the germplasm of this crop for developing climate-resilient eggplant varieties. The study provides a model for how we can apply landscape genomics to the wild relatives of other crops.