Here we report a novel nanocomposite composed from Mg-doped NiO and Mg-doped\MWCNT using a facile sol-gel method. The synthesized Mg-doped NiO and Mg-doped\MWCNT nanocomposite was characterization by XRD diffraction (XRD), energy dispersive spectroscopy (EDS), Fourier transform infrared spectroscopy (FTIR), scanning electron microscopy (SEM), and UV–Vis spectrophotometer. The X-Ray analysis revealed that the formation of nanocomposites, which has a cubic phase and a high crystalline nature. The FE-SEM images confirmed the success of decoration the 6%Mg- doped NiO on the surface of the treated MWCNT through the emergence of spherical shapes over the cylindrical tubes. Conversely, optical measurements reveal that the energy gap value for the Mg-NiO and the Mg/NiO-MWCNT nanocomposite are 3.28 and 2.82 eV, respectively. This indicates decreasing the zone between conduction band and valance band. Moreover, it found that Mg doped NiO\MWCNT nanocomposite showed high removal efficiency towards the lead element compared with the Mg-doped NiO. Also, MTT test was employed to study antitumor activity against MCF-7 and WRL68 cells. Our results showed that the Mg doped NiO-MWCNT had cell viability of 66.7 and 71.9% against MCF-7 and WRL68, respectively. Whereas, Mg-doped NiO sample showed cell viability of 70.2 and 71.9% against MCF-7 and WRL68, respectively.