A major goal of metacommunity ecology is to infer the local- and regional-scale processes that underlie community assembly. In dendritic ecological networks, branching patterns and directional flow can alter the balance between local and regional factors during assembly. Vertical habitat structure may further affect community assembly in dendritic metacommunities. In this study, we analyzed the bacterial metacommunity of a fifth-order mountain stream network to assess differences in community assembly (1) between planktonic and benthic habitats, (2) across spatial scales, and (3) between headwater and downstream regions of the network. Using taxonomic and phylogenetic null modeling, we found habitat-specific spatial patterns of community assembly across the dendritic network. Compositional differences between planktonic and benthic communities were maintained by variable selection, but we also found evidence of local dispersal limitation between the two habitats. Planktonic community assembly was scaledependent, transitioning from homogeneous selection at local scales to variable selection at regional scales, while benthic community assembly was less scale dependent. Variable selection structured headwaters in both habitat types, but downstream communities were primarily structured by homogeneous selection, especially in sediments. Taken together, our results show that vertical habitat structure contributes to the scale-dependent processes of community assembly across the dendritic metacommunity.