Sonochemical synthesis was used to create novel solar light active Mg-doped CuO nanoparticles. Through a chemical impregnation method, the produced nanomaterial was changed with PVA (polyvinylalcohol). The optical properties, crystal structure, and surface morphologies of the synthesized nanomaterials were probed by UV-visible spectroscopy (UV-vis-DRS), Fourier transform infrared spectroscopy (FT-IR), Raman spectroscopy, X-ray diffraction (XRD), scanning electron microscopy (SEM), high-resolution transmission electron microscopy (HR-TEM), energy-dispersive X-ray spectroscopy (EDX), X-ray photoelectron spectroscopy (XPS), photoluminescence spectroscopy (PL), thermogravimetric analysis (TGA), and BET specific surface area studies. The prepared nanomaterials were utilized for the photocatalytic destruction of methylene blue (MB). The photocatalytic activity of PVA-modified Mg-doped CuO nanocomposite is magnificent to CuO and Mg-doped CuO nanomaterials. This is because of the remarkable electron-hole dissociation and overwhelming increased photocatalytic activity achieved through surface modification. Additionally, the consequence of several reaction factors like pH, catalyst dosage, and MB concentration was deliberated. This research could lead to the development of polymer-based metal oxide-doped catalysts for the decomposition of organic contaminants in wastewater.