Biomass extract-mediated fabrication of metal oxide nanoparticles received significant attention in material research because it is eco-friendly, cost-effective, and easy to scalability. Here, the fabrication of Boerhavia diffusa leaf extract (BDE)-mediated magnesium-doped nickel oxide nanoparticles (Mg-doped-NiO-BDE) and their in vitro bioactivities are reported. Several characterization procedures are used to characterize the prepared NiO nanoparticles. Field emission scanning electron microscopy and transmission electron microscopy images exhibit that the Mg-doped-NiO-BDE are distorted spherical. The X-ray diffraction showed that the average crystallite sizes of the nanoparticles are around 51–55 nm. X-ray diffraction, X-ray photoelectron spectroscopy, and energy-dispersive X-ray spectroscopy analysis results confirm that the NiO is produced, and Mg-doping has occurred in the adopted reaction condition. The doped NiO NPs exhibit broad-spectrum antibacterial activity against Escherichia coli (E. coli) and Staphylococcus aureus (S. aureus), as well as antifungal action against Aspergillus niger (A. nigar). The antioxidant, anti-inflammatory, and anti-diabetic efficiencies of doped-NiO NPs (concentration = 400 μg/mL) are around 65 %, 89 %, and 87 %, respectively. The Mg-doped-NiO-BDE nanoparticles show around 75 % viability against the human lung cancer cell line (A459) with a concentration of up to 100 μg/mL, while the IC50 value is 185.6 μg/mL. The scratch test is executed with the mouse fibroblast cells (L929) in which doped-NiO NPs exhibit around 36 % wound-closing ability. The above results signify that the fabricated Mg-doped-NiO-BDE is a potent bioactive material that could be used for biomedical applications.