Diatoms are an indispensable component of river ecosystem biodiversity and play an important role in aquatic ecosystems. The community assembly mechanism of diatoms has always been a central issue in the study of aquatic ecology. In recent years, many measures have been implemented in the Ashi River Basin (ASRB) to promote social and economic development, such as bridge construction, river bottom sand mining, agricultural irrigation, and urban expansion. However, there are few studies on the effects of these activities on the mechanism of diatom community assembly. First, we found that the α- and β-diversity of planktonic diatoms was higher in the normal season, while the α- and β-diversity of benthic diatoms was higher in the dry season, and the α- and β-diversity of both planktonic and benthic diatoms was reduced in the wet season. Second, the community structures of planktonic and benthic diatoms were significantly different in different hydrological periods, and the differences between planktonic diatoms communities were more evident than those between benthic diatom communities. Third, distance-decay analysis indicated that the distribution of the two types of diatom communities in the ASRB was influenced by both dispersal limitation and environmental selection. Finally, variance partitioning analysis revealed that dispersal limitation was the dominant driving factor for the spatial and temporal differentiation of planktonic and benthic diatoms. Our study reveals the important role of dispersal limitation in the community assembly of planktonic and benthic diatoms in rivers under different hydrological conditions. This study provides new insights for further understanding the relative importance of niche theory and neutral theory to aquatic microbial community assembly. Our research provides key information for analysing the structure of aquatic ecosystems and basic data for designing biodiversity conservation strategies in China's cold watersheds.