As a widely available, low-cost agricultural byproduct, bagasse is a potential solid carbon source and provides microbial attachment as a biofilm carrier. In this study, the effects of bagasse as a carbon source on biofloc formation, water quality, microbial community structure, and nitrogen conversion in a shrimp culture system were explored, and the performance of bagasse bioflocs was assessed. No bagasse was added to the control group (CK), and three bagasse addition groups were set up, with the floc content of the water maintained at 5 mL/L (BF5 group), 10 mL/L (BF10 group), and 15 mL/L (BF15 group). The results showed that bagasse bioflocs formed in the fourth week when bagasse was placed in the culture water, and the surface of bagasse was covered with thick biofilm at that time. The DOC content of the BF15 group was significantly greater than that of the CK group, from 30.31 to 105.06% (P < 0.05), and the DOC increased with increasing bagasse biofloc content. The BF group rapidly converted TAN to NO2--N and then to NO3--N because the accumulation of nitrite nitrogen in the BF15 group occurred 1 week earlier than in the other groups; at the 8th week, the nitrite nitrogen conversion rate of each BF group was close to 100%, which was significantly greater than that of the CK group (P < 0.05). The relative abundances of genes encoding microbial glutamate dehydrogenase and glutamate synthase increased in the bagasse biofloc groups (P < 0.05). The relative abundances of genes from Rhodobacterales and Hyphomicrobiales in each group were greater, but bagasse bioflocs increased the proportion of Hyphomicrobiale. In summary, adding bagasse to the shrimp culture system can form a biofloc system, resulting in the formation of a rich bacterial biofilm on its surface. Bagasse addition not only affects the composition of microbial communities but also accelerates the nitrification process in water. As a result, ammonia and nitrite are converted into nitrate, which is essential for maintaining the stability of the ecosystem balance in aquaculture water.