The overuse of traditional antibiotics and antimicrobial agents has led to the growth of a large number of drug-resistant bacteria, which represents a serious threat to public safety and human health. Therefore, there is an urgent need to develop new-generation antimicrobial materials to cope with the hazards posed by drug-resistant bacteria. In this study, magnetic ZnFe
2O
4 nanorods were synthesised using ferric chloride (FeCl
3), zinc chloride (ZnCl
2) and sodium acetate (NaOAc) as raw materials. Silver nanoparticles (Ag NPs) with an average particle size of 8.8 nm were then adsorbed onto the surface of ZnFe
2O
4, resulting in the formation of ZnFe
2O
4@Ag magnetic nanocomposites.This material can effectively prevent the agglomeration of Ag NPs, while the small diameter of the nanoparticles significantly enhances the antibacterial activity of the composite material, and the introduction of Zn and Fe elements can improve biocompatibility. The composite material was systematically characterized using TEM, XPS, XRD, UV-Vis, FT-IR, and VSM, among others. The antibacterial activity and mechanism of the composite material were studied against Gram-negative
Escherichia coli (
E. coli) and Gram-positive
Staphylococcus aureus (
S. aureus) as test bacteria. Experimental results show that ZnFe
2O
4@Ag has an antibacterial activity of 99.9% against
E. coli and
S. aureus within 60 minutes at a concentration of 200 μg/mL. The mechanism of antibacterial action indicates that ZnFe
2O
4@Ag disrupts the bacterial cell walls and membranes, causing leakage of bacterial contents and ions, thereby leading to osmotic imbalance and resulting in bacterial death. At the same time, the biocompatibility of this composite material is significantly improved compared to Ag NPs alone.