In this research, we have successfully synthesized the ZnO/MgO nanocomposite with two different concentrations, 1:1 and 1:2 ratios, via. a phytoextract mediated simple, efficient and inherent safe and cost-effective method. Both nanomaterials are characterized through XRD, FT-IR, SEM, EDAX, TEM, BET, XPS and UV-Visible studies. The catalytic efficiency of the prepared nanostructures was examined by the photocatalytic removal of crystal violet (CV) dye. The degradation potentials of ZnO/MgO nanocomposites 1:1 and 1:2 ratio were found to be 99.72 and 97.04%, respectively, within 75 min. of sunlight irradiation at pH 9 using 0.6 g/L catalyst for a 30-ppm dye solution. The excellent performance of 1:1 ratio photocatalysts was due to their good optical and textural properties compared to 1:2 ratio. The degradation reactions of CV dye follow first-order kinetics with rate constants of 0.07 and 0.05 min(-1) for 1:1 and 1:2 ratio, and both the photocatalysts show admirable recycling ability for four cycles of reactions. The 1:1 ratio nanocomposite expresses significantly greater free radical trapping capability than 1:2 ratio, with a maximum inhibition of 82%. Moreover, the anticancer potential of composite structures has been discovered using MTT assays.