Biofilms are created when micro-colonies adhere to a solid surface and produce a strong extracellular matrix which increases the risk of infection and impedes the healing process of bone defects. Although post-operative antibiotics are commonly prescribed to prevent infections, they carry the risk of side effects and antibiotic resistance. Current research explored the potential of magnesium doped zinc oxide incorporated silk fibroin scaffolds to prevent the biofilms formation for alveolar bone regeneration applications. Novel silk fibroin (SF)/hydroxyapatite (HA) scaffolds incorporated with magnesium-doped zinc oxide nanoparticles (Mg–ZnO NPs with 0.5, 1 and 2 % Mg) were fabricated by freeze gelation method. The data suggested that new materials exhibit remarkable antibacterial activity against Staphylococcus aureus. Moreover, these materials are also found to be both biodegradable and biocompatible. The study revealed that scaffolds displayed excellent antibacterial activity that was increased with increasing concentration of Mg in ZnO, with a maximum of 49.39 % was observed for 2 % of Mg doped ZnO. Additionally, biodegradation of the material also increases with the increase in concentration of Mg doping in ZnO. The adequate porosity in the range of 67 %–74.3 % was recorded of new materials substituted with Mg–ZnO, which led to improved cell viability (99.6 %) and uniform deposition of apatite over the surface of scaffolds, making it an excellent candidate for biomedical applications that require antibacterials properties with high cell viability.