BackgroundSoybean (Glycine max), a vital grain and oilseed crop, serves as a primary source of plant protein and oil. Soil salinization poses a significant threat to soybean planting, highlighting the urgency to improve soybean resilience and adaptability to saline stress. Melatonin, recently identified as a key plant growth regulator, plays crucial roles in plant growth, development, and responses to environmental stress. However, the potential of melatonin to mitigate alkali stress in soybeans and the underlying mechanisms remain unclear.ResultsThis study investigated the effects of exogenous melatonin on the soybean cultivar Zhonghuang 13 under alkaline stress. We employed physiological, biochemical, transcriptomic, and metabolomic analyses throughout both vegetative and pod-filling growth stages. Our findings demonstrate that melatonin significantly counteracts the detrimental effects of alkaline stress on soybean plants, promoting plant growth, photosynthesis, and antioxidant capacity. Transcriptomic analysis during both growth stages under alkaline stress, with and without melatonin treatment, identified 2,834 and 549 differentially expressed genes, respectively. These genes may play a vital role in regulating plant adaptation to abiotic stress. Notably, analysis of phytohormone biosynthesis pathways revealed altered expression of key genes, particularly in the ARF (auxin response factor), AUX/IAA (auxin/indole-3-acetic acid), and GH3 (Gretchen Hagen 3) families, during the early stress response. Metabolomic analysis during the pod-filling stage identified highly expressed metabolites responding to melatonin application, such as uteolin-7-O-(2''-O-rhamnosyl)rutinoside and Hederagenin-3-O-glucuronide-28-O-glucosyl(1,2)glucoside, which helped alleviate the damage caused by alkali stress. Furthermore, we identified 183 differentially expressed transcription factors, potentially playing a critical role in regulating plant adaptation to abiotic stress. Among these, the gene SoyZH13_04G073701 is particularly noteworthy as it regulates the key differentially expressed metabolite, the terpene metabolite Hederagenin-3-O-glucuronide-28-O-glucosyl(1,2)glucoside. WGCNA analysis identified this gene (SoyZH13_04G073701) as a hub gene, positively regulating the crucial differentially expressed metabolite of terpenoids, Hederagenin-3-O-glucuronide-28-O-glucosyl(1,2)glucoside. Our findings provide novel insights into how exogenous melatonin alleviates alkali stress in soybeans at different reproductive stages.ConclusionsIntegrating transcriptomic and metabolomic approaches, our study elucidates the mechanisms by which exogenous melatonin ameliorates the inhibitory effects of alkaline stress on soybean growth and development. This occurs through modulation of biosynthesis pathways for key compounds, including terpenes, flavonoids, and phenolics. Our findings provide initial mechanistic insights into how melatonin mitigates alkaline stress in soybeans, offering a foundation for molecular breeding strategies to enhance salt-alkali tolerance in this crop.