Understanding the processes and mechanisms that shape the distribution patterns and variations of biodiversity along spatial gradients continues to be a priority for ecological research. We focused on the biodiversity of benthic diatom communities within a large near‐natural watershed. The objectives are: (1) to explore the overall spatial patterns of benthic diatom biodiversity; (2) to investigate the effects associated with watercourse position and environmental variables, as well as both common and rare species on two facets (i.e., taxonomic and functional) of alpha and beta diversity; and (3) to unveil the mechanisms underlying their spatial variations. Alpha diversity indices along the stream watercourse showed a clear increasing trend from upstream to downstream sites. Results of random forest regression identified conductivity as the primary factor influencing functional alpha diversity, while elevation emerged as the predominant factor for taxonomic alpha diversity. Beta diversity partitioning revealed that taxonomic beta diversity generally exceeded functional beta diversity. These diversity measures exhibited different patterns along the watercourse position: taxonomic beta diversity remained relatively consistent along the watercourse, whereas functional total beta diversity and its two components of middle stream sites were lower than those of upstream and downstream sites. Functional beta diversity was sustained by dominant and common species, while rare species made significant contributions to taxonomic beta diversity. Both taxonomic and functional beta diversity and its components displayed a stronger influence from spatial factors than from local environmental, geo‐climatic, and nutrient variables. Collectively, taxonomic and functional alpha and beta diversity demonstrated distinct responses to the main environmental gradients and spatial factors within our catchment, highlighting their different insights into diatom diversity. Furthermore, research is required to assess the generalizability of our findings to similar ecosystems. In addition, this study presents opportunities for expansion to include other taxa (e.g., macroinvertebrates and fish) to gain a comprehensive understanding of the driving mechanisms behind stream biodiversity.