The present study reports the green synthesis of cupric oxide nanoparticles (CuO NPs) by an aqueous leaf extract of Moringa oleifera and the antifungal activity assessment of CuO NPs against the phytopathogenic fungi Aspergillus flavus and Aspergillus niger. The CuO NPs showed variable fungitoxic effects against A. flavus and A. niger. At higher doses (1 mg/mL), 83.51 % of mycelial inhibition was found against A. flavus, but 43.51 % was found against A. niger. The percentage inhibition of mycelial growth was found to be dose dependent. The cell viability analysis was carried out to reveal the mechanism of the fungitoxic effect of synthesized NPs and it was revealed that the CuO NPs caused oxidative stress associated with increased ROS production, leading to fungal cell death. The synthesized CuO NPs showed single phase cupric oxide with a monoclinic structure and highly uniform in size (3–5 nm). As the synthesized CuO NPs showed good stability under open atmospheric conditions and a fungitoxicity effect against A. flavus, they may be used to control fungal diseases in an eco‐friendly manner.