Bacterial infections can seriously harm human health, and the overuse of traditional antibiotics and antibacterial agents will increase the resistance of bacteria. Therefore, it is necessary to prepare a new kind of antibacterial material. In this work, a carbon dots and silver nanoparticles (CDs/AgNPs) composite has been synthesized in a one-step facile method without the introduction of toxic chemicals, wherein CDs could serve as a reducing and stabilizing agent. The CDs/AgNPs composite was characterized by UV-vis spectrophotometry, X-ray photoelectron spectroscopy (XPS), X-ray diffraction (XRD), and transmission electron microscopy (TEM), which demonstrate that the silver nanoparticles were successfully synthesized in the composite. The zeta potential of the CDs/AgNPs composite was -15.3 mV, indicating that the composite possesses high stability. Furthermore, the composite also exhibited biocidal effects for both Gram-negative E. coli bacteria and Gram-positive S. aureus bacteria. Thus, the composite is considered to be of great potential in bactericidal and biomedical applications.