Highlights• Nicosulfuron induces oxidative stress and inhibits growth in sweet corn • Melatonin mitigates nicosulfuron toxicity by improving antioxidant and photosynthetic capacities • Melatonin increases ZmALS1 and ZmCYP81A9 levels and affects target site acetolactate synthase under nicosulfuron toxicity