To elevate the resistance to corrosion of magnesium alloys, silicon and zinc were simultaneously coated on the surface of AZ31 magnesium alloy using magnetron sputtering. The corrosion characteristics of the coated and uncoated samples were evaluated using electrochemical tests. Additionally, the antibacterial activity against Escherichia coli pathogens was assessed through the agar diffusion method. Compared to the AZ31 substrate and the sequentially sputtered Si and Zn coated samples, the Si-Zn composite coating specimens exhibited the minimal corrosion current density, and elevated charge impedance modulus (Z), transfer resistance (Rct), and phase angle. The simultaneous sputtering of Si-Zn composite coatings significantly slowed down the transmission of corrosive ions to the magnesium alloy surface, markedly enhancing the resistance to corrosion of magnesium alloy in SBF solution. Furthermore, the antibacterial activity of the simultaneously sputtered Si-Zn composite coating samples was superior to that of the AZ31 matrix. Therefore, the Si-Zn composite coating prepared by simultaneous sputtering possesses excellent corrosion resistance and antimicrobial properties.