Growing evidence has suggested a strong link between gut microbiota and host fitness, yet our understanding of the assembly mechanisms governing gut microbiota remains limited. Here, we collected invasive and native freshwater snails coexisting at four independent sites in Guangdong, China. We used high-throughput sequencing to study the assembly processes of their gut microbiota. Our results revealed significant differences in the diversity and composition of gut microbiota between invasive and native snails. Specifically, the gut microbiota of invasive snails exhibited lower alpha diversity and fewer enriched bacteria, with a significant phylogenetic signal identified in the microbes that were enriched or depleted. Both the phylogenetic normalized stochasticity ratio (pNST) and the phylogenetic-bin-based null model analysis (iCAMP) showed that the assembly process of gut microbiota in invasive snails was more deterministic compared with that in native snails, primarily driven by homogeneous selection. The linear mixed-effects model revealed a significant negative correlation between deterministic processes (homogeneous selection) and alpha diversity of snail gut microbiota, especially where phylogenetic diversity explained the most variance. This indicates that homogeneous selection acts as a filter by the host for specific microbial lineages, constraining the diversity of gut microbiota in invasive freshwater snails. Overall, our study suggests that deterministic assembly-mediated lineage filtering is a potential mechanism for maintaining the diversity of gut microbiota in freshwater snails.