The patterns of macrobiota in lotic ecosystems have been extensively explored, however, the dynamics of microbiota remain poorly investigated, especially in the high-elevation region. To address this deficit, we collected eight samples to unveil the bacterial and archaeal community in the Kaidu river, located at the arid region of northwestern China (an average of 2,500 m a.s.l.). For the bacterial community, phylogenetically Betaproteobacteria prevailed, followed by Alphaproteobacteria and Actinobacteria; at the finer genus level, Limnohabitans and Variovorax were prominent. Along the river, the bacterial community showed a continuous succession. Specifically, their α- and β-diversity gradually increased, suggesting a distance-decay pattern. Additionally, there was an ecological transition between the dominant and the rare sub-community along the river: the relative abundance of the dominant members gradually decreased as the rare members increased. We report that temperature and spatial distance were significantly related to the variation of bacterial community. Variance partitioning analysis showed that the environmental factors contributed more to the bacterial community than did the spatial distance. In the case of the archaeal community, the methanogenic groups, mainly Methanosaeta and Methanosarcina, were prominent within the Kaidu river. Unlike the continuous change in the patterns of the bacterial community, the archaeal community showed a constant pattern along the river. Our results showed that the archaeal community was independent of the environmental and spatial factors. We propose that the inoculation of soil-derived archaea is responsible for the archaeal community in the Kaidu river. Together, our study demonstrated that the bacterial community in the high-elevation Kaidu river is a continuum, whereas the archaeal community is not.