Plateau river ecosystems are often highly vulnerable and responsive to environmental change. The driving mechanism of fish diversity and community assembly in plateau rivers under changing environments presents a significant complexity to the interdisciplinary study of ecology and environment. This study integrated molecular biological techniques and mathematical models to identify the mechanisms influencing spatial heterogeneity of freshwater fish diversity and driving fish community assembly in plateau rivers. By utilizing environmental-DNA metabarcoding and the null model, this study revealed the impact of the stochastic process on fish diversity variations and community assembly in the Huangshui Plateau River of the Yellow River Basin (YRB) in China. This research identified 30 operational taxonomic units (OTUs), which correspond to 20 different fish species. The findings of this study revealed that the fish α-diversity in the upstream region of Xining is significantly higher than in the middle-lower reach (Shannon index: P=0.017 and Simpson: P=0.035). This pattern was not found to be related to any other environmental factors besides altitude (P=0.023) that we measured. Further, the study indicated that the assembly of fish communities in the Huangshui River primarily depends on stochastic ecological processes. These findings suggested that elevation was not the primary factor impacting the biodiversity patterns of fish in plateau rivers. In plateau rivers, spatial heterogeneity of fish community on elevation is mainly determined by stochastic processes under habitat fragmentation, rather than any other physicochemical environmental factors. The limitations of connectivity in the downstream channel of the river could be taken the mainly responsibility for stochastic processes of fish community in Huangshui River. Incorporating ecological processes in the eDNA approach holds great potential for future monitoring and evaluation of fish biodiversity and community assembly in plateau rivers.