Dispersal and natural selection are key evolutionary processes shaping the distribution of phenotypic and genetic diversity. For species inhabiting complex spatial environments however, it is unclear how the balance between gene flow and selection may be influenced by landscape heterogeneity and environmental variation. Here, we evaluated the effects of dendritic landscape structure and the selective forces of hydroclimatic variation on population genomic parameters for the Murray River rainbowfish, Melanotaenia fluviatilis across the Murray–Darling Basin, Australia. We genotyped 249 rainbowfish at 17,503 high-quality SNP loci and integrated these with models of network connectivity and high-resolution environmental data within a riverscape genomics framework. We tested competing models of gene flow before using multivariate genotype–environment association (GEA) analysis to test for signals of adaptive divergence associated with hydroclimatic variation. Patterns of neutral genetic variation were consistent with expectations based on the stream hierarchy model and M. fluviatilis’ moderate dispersal ability. Models incorporating dendritic network structure suggested that landscape heterogeneity is a more important factor determining connectivity and gene flow than waterway distance. Extending these results, we also introduce a novel approach to controlling for the unique effects of dendritic network structure in GEA analyses of populations of aquatic species. We identified 146 candidate loci potentially underlying a polygenic adaptive response to seasonal fluctuations in stream flow and variation in the relative timing of temperature and precipitation extremes. Our findings underscore an emerging predominant role for seasonal variation in hydroclimatic conditions driving local adaptation and are relevant for informing proactive conservation management.