In order to study the antibacterial effect of extracts of Astragalus membranaceus, Licorice, and Sophora alopecuroides and their compounds, water extraction was used to prepare single-dose extracts of Chinese herbal medicines, and nine different compounds were obtained according to L9(34) orthogonal design. Escherichia coli, Staphylococcus aureus, and Salmonella were used as test bacteria for antibacterial test in vitro. The results showed that Astragalus membranaceus, Licorice, and Sophora alopecuroides had a certain antibacterial effect on Escherichia coli, Staphylococcus aureus, and Salmonella. Among the three different single extracts, Astragalus membranaceus had the best antibacterial effect on the three bacteria, followed by Licorice and Sophora alopecuroides. Compared with the single dose, the antibacterial effects of the three kinds of Chinese herbal medicines were improved as a whole, and the best ratios of antibacterial effects on Escherichia coli, Staphylococcus aureus, and Salmonella were 1∶1∶2, 2∶2∶1 and 4∶1∶2, respectively. It was proved that when the ratio of the three Chinese herbal medicines was 1∶1∶2, the antibacterial effect was the best, and the diameter of the antibacterial zone of the compound against Escherichia coli, Staphylococcus aureus, and Salmonella was 15.20, 14.10, and 12.92 mm, respectively. The results showed that in livestock production, it is suggested that the compound addition ratio of Astragalus membranaceus, Licorice, and Sophora alopecuroides water extracts should be 1∶1∶2, and the concentrations should be 0.6, 0.6, and 1.2 g/mL at this time, so as to maximize the antibacterial effect of Chinese herbal medicines. [ABSTRACT FROM AUTHOR]