The current research is concerned with the synthesis of magnesium oxide (MgO) nanoparticles (NPs) from Abrus precatorius L. bark extract via the green chemistry method. The synthesized MgO NPs was confirmed by using several characterization methods like XRD, FTIR, SEM, TEM, and UV-visible analysis. The synthesized MgO NPs displayed a small particle size along with a specific surface area. Abrus precatorius bark synthesized MgO NPs with a higher ratio of dye degradation, and antioxidant activity showed a higher percentage of free radical scavenging in synthesized MgO NPs. Zebrafish embryos were used as a model organism to assess the toxicity of the obtained MgO nanoparticles, and the results concluded that the MgO NPs were nontoxic. In addition, the anticancer properties of MgO nanoparticles were analyzed by using a human melanoma cancer cell line (A375) via MTT, XTT, NRU, and LDH assessment. MgO NPs treated a human melanoma cancer cell line and resulted in apoptosis and necrosis based on the concentration, which was confirmed through a genotoxicity assay. Moreover, the molecular mechanisms in necrosis and apoptosis were conferred to depict the association of magnesium oxide nanoparticles with the human melanoma cancer cell line. The current study on MgO NPs showed a broad-scope understanding of the use of these nanoparticles as a medicinal drug for melanoma cancer via its physiological mechanism and also a novel route to obtain MgO NPs by using the green chemistry method.