Abstract:[Objective] The biofloc-based culture system (BFS) of Penaeus vannamei is a new ecological shrimp production mode based on the concept of cultivating and regulating the microbial community in the aquaculture system. However, the characteristics and assembly processes of microbial communities in different habitats of the BFS remain unclear. [Methods] The 16S rRNA gene sequencing was employed to explore the bacterial community composition in three different habitats (water, bioflocs, and shrimp gut) of the BFS. SourceTracker and the neutral model were adopted to explore the characteristics and assembly processes of bacterial communities in different habitats. [Results] The bacterial community diversity and composition varied significantly in the three habitats, and the structures and composition of bacterial communities were similar between bioflocs and shrimp gut. SourceTracker results showed that 98.76% of bacterial taxa in the shrimp gut were sourced from bioflocs, and only 0.83% were derived from water. Ruegeria existed in all the three habitats, with the relative abundance of 1.72%, 7.34%, and 6.00% in water, bioflocs, and shrimp gut, respectively. The unique amplicon sequence variants (ASVs) showed the maximal number of 89 in water, mainly belonging to Mariculis and Owenweeksia. Bioflocs contained 56 ASVs, which were mainly Rheinheimera. Only 10 ASVs were present in the shrimp gut, mainly belonging to Roseobacter. The bacterial communities in water, bioflocs, and shrimp gut were all fit to the neutral model, which indicated that the bacterial communities in the three habitats were dominated by the neutral process. [Conclusion] The microbial communities in different habitats of the BFS were significantly different, and the intestinal bacteria of shrimp mainly came from bioflocs. The assembly processes in the three habitats were dominated by neutral processes. The results provide a theoretical basis for regulating the microbial community in the BFS.