The migration-selection balance often governs the evolution of lineages, and speciation with gene flow is now considered common across the tree of life. Ecological speciation is a process that can facilitate divergence despite gene flow due to strong selective pressures caused by ecological differences; however, the exact traits under selection are often unknown. The transition from freshwater to saltwater habitats provides strong selection targeting traits with osmoregulatory function. Several lineages of North American watersnakes (Nerodia spp.) are known to occur in saltwater habitat and represent a useful system for studying speciation by providing an opportunity to investigate gene flow and evaluate how species boundaries are maintained or degraded. We use double digest restriction-site associated DNA sequencing to characterize the migration-selection balance and test for evidence of ecological divergence within the Nerodia fasciata-clarkii complex in Florida. We find evidence of high intraspecific gene flow with a pattern of isolation-by-distance underlying subspecific lineages. However, we identify genetic structure indicative of reduced gene flow between inland and coastal lineages suggesting divergence due to isolation-by-environment. This pattern is consistent with observed environmental differences where the amount of admixture decreases with increased salinity. Furthermore, we identify significantly enriched terms related to osmoregulatory function among a set of candidate loci, including several genes that have been previously implicated in adaptation to salinity stress. Collectively, our results demonstrate that ecological differences, likely driven by salinity, cause strong divergent selection which promotes divergence in the N. fasciata-clarkii complex despite significant gene flow.