Abstract In the current report, MgO nanoparticles are synthesized by the plasma-assisted reduction method. This method is eco-friendly due to its safety, not use of toxic reducing agents, low cost, and rapid synthesis. Several techniques were employed to determine the crystalline size, particle size, morphology, elemental analysis, and optical properties of the MgO NPs. MgO nanoparticles had a semi-spherical particle structure with diameters ranging from 30.40 to 39.57 nm. The average crystalline size was measured to be 23.7 nm. An analysis using a UV–vis spectrophotometer reveals that the absorbance of MgO nanoparticles results in a significant peak at 354 nm, indicating an energy band gap of 3.2 eV. Subsequent detailed analysis was performed utilizing Rietveld refinement to accurately determine the crystallographic parameters. Additionally, electron density mapping was scrutinized to provide further insights into the atomic arrangement. The antibacterial and antibiofilm activity of MgO NPs was assessed against Klebsiella pneumoniae, Escherichia coli (gram-negative), and Staphylococcus aureus (gram-positive) bacteria at a dose concentration of 10 mg/L. The antibacterial activity (zone of inhibition) and inhibition biofilm rate of MgO NPs against S. aureus were more effective than those of K. peneumoniae and E. coli. Consequently, this investigation demonstrates that the MgO NPs exhibited strong antibacterial properties and exhibited significant potential for the inhibition of pathogenic bacteria.