Understanding the role of natural selection in the evolution of wild populations is challenging due to the spatial complexity of natural systems. The richest diversity of freshwater fishes in the world is found in the Amazon Basin, a system where marked hydrochemical differences exist at the interface of major rivers with distinct “water colors” (i.e., black, white, and clear water). We hypothesize that divergent natural selection associated with these “aquatic ecotones” influences population-level adaptive divergence in the non-migratory Amazonian fish fauna. This hypothesis was tested using a landscape genomics framework to compare the relative contribution of environmental and spatial factors to the evolutionary divergence of the Amazonian characin fishTriportheus albus. The framework was based on spatial data,in situhydrochemical measurements, and 15,251 filtered SNPs (single nucleotide polymorphisms) forT. albussampled from three major Amazonian rivers. Gradient Forest, redundancy analysis (RDA) and BayPass analyses were used to test for signals of natural selection, and model-based and model-free approaches were used to evaluate neutral population differentiation. After controlling for a signal of neutral hierarchical structure which was consistent with the expectations for a dendritic system, variation in turbidity and pH were key factors contributing to adaptive divergence. Variation in genes involved in acid-sensitive ion transport pathways and light-sensitive photoreceptor pathways was strongly associated with pH and turbidity variability. This study improves our understanding of how natural selection and neutral evolution impact on the distribution of aquatic biodiversity from the understudied and ecologically complex Amazonia.