Doping in metal oxide systems is being chased by many researchers since it is enhancing their properties. In the present study, Cu1-xMgxO nanoparticles, capped with EDTA were synthesized by the chemical co-precipitation method, with x = 0.000, 0.005, 0.010, 0.015, and 0.020, and further characterized by different techniques. The impact of doping by Mg2+ ions on the structural, optical, and magnetic properties of CuO nanoparticles was investigated and the antibacterial activity of the synthesized nanoparticles was studied by antibiofilm screening. The X-ray Powder Diffraction (XRD) patterns show the formation of a pure CuO phase with a good incorporation of Mg-dopant into the CuO lattice due to the comparable ionic radii of Cu2+ and Mg2+ ions. The Mg-dopant increases the crystallite size from 25 nm (at x = 0.000) to 28.12 nm (at x = 0.020). The Transmission Electron Microscope (TEM) images reveal the effect of Mg-doping on the morphology of CuO nanoparticles by decreasing their agglomeration, resulting in more uniform spherical-shaped nanoparticles. Energy Dispersive X-ray (EDX) and X-ray Photoelectron Spectroscopy (XPS) confirm the purity and the successful development of Mg-doped CuO nanoparticles. The changes in the characteristic vibrational modes of CuO are studied by Raman spectra, upon Mg-doping. Furthermore, the optical properties explored by Ultraviolet-Visible (UV-Vis) spectroscopy reveal a redshift of the absorption peaks of CuO nanoparticles due to the Mg-doping. The energy gap (Eg) is affected by Mg-doping, where its broadening is attributed to the quantum confinement effect in CuO. The magnetic properties were investigated by Vibrating Sample Magnetometer (VSM) at room temperature. Cu1-xMgxO nanoparticles have combined paramagnetic and weak ferromagnetic behaviors. Besides, Cu1-xMgxO nanoparticles exhibited significant antibiofilm effects. These results highlight the potential use of Mg-doped CuO nanoparticles as antibiofilm agents.