Climate change, specifically high temperatures, can reduce soil moisture and cause hypersaline conditions, which creates an unsustainable agro-production system. Microbial symbionts associated with plants relinquish stressful conditions by producing stress-protecting substances. Melatonin is a signaling and stress-protecting molecule for plants, but is least known for microbial symbionts and their function in stress protection. Here, our study shows that the melatonin-synthesizing Bacillus velezensis EH151 (27.9 ng/mL at 96 h) significantly improved host plant (Glycine max L.) growth, biomass, photosynthesis, and reduced oxidative stress during heat and salinity stress conditions than the non-inculcated control. The EH151 symbiosis enhanced the macronutrient (P, Ca, and K) and reduced Na uptake in shoots during stress conditions. The microbial inoculation significantly expressed the high-affinity K