AbstractImplantation is a frequent procedure in orthopedic surgery, particularly in the aging population. However, it possesses the risk of infection and biofilm formation at the surgical site. This can cause unnecessary suffering to patients and burden on the healthcare system. Pure Mg, as a promising metal for biodegradable orthopedic implants, exhibits some antibacterial effects due to the alkaline pH produced during degradation. However, this antibacterial effect may not be sufficient in a dynamic environment, for example, the human body. The aim of this study was to increase the antibacterial properties under harsh and dynamic conditions by alloying silver metal with pure Mg as much as possible. Meanwhile, the Mg-Ag alloys should not show obvious cytotoxicity to human primary osteoblasts. Therefore, we studied the influence of the microstructure and the silver content on the degradation behavior, cytocompatibility, and antibacterial properties of Mg-Ag alloys in vitro. The results indicated that a higher silver content can increase the degradation rate of Mg-Ag alloys. However, the degradation rate could be reduced by eliminating the precipitates in the Mg-Ag alloys via T4 treatment. By controlling the microstructure and increasing the silver content, Mg-Ag alloys obtained good antibacterial properties in harsh and dynamic conditions but had almost equivalent cytocompatibility to human primary osteoblasts as pure Mg.