With the development of modern aquaculture, the number of pathogenic bacteria in fish farms has gradually risen. Studies have shown that traditional Chinese medicinal herbs and natural products have greatly contributed to reducing bacterial growth and reproduction. To explore the changes in different proportions of Houttuynia cordata Thunb and Jussiaea stipulacea on the bacterial composition in water, roots, and sediments, we conducted 16S rRNA gene sequencing on samples of the same to analyze floating beds (60% H. cordata Thunb and 30% H. cordata Thunb, 30% J. stipulacea named HcT1, HcT2, and Jr, respectively) after 30 days in the presence of tilapia culture water, roots, and sediments with bacterial community changes in the respective experimental groups. The results showed that 4811 bacterial operational taxonomic units (OTUs) were obtained; the alterations included decreased Spirochaetae, Nitrospirae, and Elusimicrobia in water; a significant increase in Tenericutes, Chlorobi, and Nitrospirae in HcT1 roots; and decreased Firmicutes and Fusobacteria in HcT2 and Jr roots. Actinobacteria, Nitrospirae, Tenericutes, and Chlamydiae increased in the HcT1 sediment; Fusobacteria and Fibrobacteres increased in the HcT2 sediment; and Cyanobacteria, Gemmatimonadetes, and Acidobacteria increased in the Jr sediment. H. cordata Thunb decreased Tenericutes and Deferribacteres, while Chlorobi, Nitrospirae, and Gemmatimonadetes increased with a 60% planting area, whereas Actinobacteria and Cyanobacteria increased with a 30% planting area, and Jr only increased Fusobacteria and Fibrobacteres. When planting with herbs, Proteobacteria increased, while Deferribacteres and Elusimicrobia decreased. The pathogenic genera may transfer among the water, plant roots, and sediments, and floating cultivation with herbs may be beneficial for blocking the spread of the pathogenic genera found in the samples.