A split-plot experiment was conducted based on a randomized complete block design with four replications in two years to study the effect of melatonin on the biochemical properties and the gene expression related to antioxidant enzyme activity in bread wheat. Irrigation levels (normal (FC = 80%)), mild stress (FC = 60%), and severe stress (FC = 40%)) were assigned to the main plots, and melatonin foliar applications (zero, 50, 100, 150, and 200 μM) were assigned to Subplots. Results showed that, with the intensification of water stress, the 1000 kernel weight decreased, and the activity of ascorbate peroxidase enzyme and flavonoid content increased. Also, the level of 100 μM melatonin had the highest 1000 kernel weight, flavonoid content, and ascorbate peroxidase enzyme activity. In this study, the highest number of grains per spike, biological yield, grain yield, chlorophyll a, chlorophyll b, carotenoids, and the lowest amount of malondialdehyde recorded for foliar treatment with 50 μM of melatonin under normal irrigation conditions and the highest proline content, total phenol, superoxide dismutase, and catalase were allocated to the 100 μM melatonin foliar treatment under severe water stress conditions. The synergistic effect of water deficit stress and melatonin foliar application increased the activity and expression level of genes related to antioxidant enzymes. So, the content of superoxide dismutase (21.30% and 65.16% respectively) and catalase (50.60% and 54.44% respectively) enzyme activity increased significantly under 100- and 150-mM melatonin foliar application in water severe water stress compared to the corresponding control treatment. Furthermore, mentioned melatonin levels increased the gene expression levels of superoxide dismutase (16.67% and 38.19% respectively), ascorbate peroxides (73.76% and 47.57% respectively), polyphenol oxidase (39.32 and 51.15%) and catalase (39.95% and 50.0% respectively) under an extreme water shortage compared with corresponding control treatment. In general, the application of 100- and 150-mM melatonin induced resistance to water deficit stress in wheat by increasing the expression of antioxidant genes.