Hymenocrater longiflorus Benth. (Surahalala) is an aromatic perennial plant species rich in secondary metabolites. It exhibits pharmaceutical effects due to its essential oils and terpenoid compounds. This study investigated the effects of different NaCl concentrations (0, 50, and 100 mM), as salt stress, alongside melatonin levels (0, 5, 15, and 25 mu M), on the physiological and phyto-biochemical traits of H. longiflorus under in vitro cultivation. The results showed that the growth parameters, including fresh weight, shoot length, chlorophyll content, carotenoids, and relative water content, were maximized by application of 5 mu M melatonin. High salinity (50 and 100 mM) significantly increased malondialdehyde and hydrogen peroxide levels, while melatonin treatment reduced the negative effects of salinity and oxidative damage in H. longiflorus. Moreover, total phenol content, phenylalanine ammonia-lyase enzyme activity, and antioxidant activity increased with NaCl and melatonin treatments. Under salt stress, certain terpenes, such as d-limonene, alpha-thujene, and gamma-terpinene, increased, while others, like alpha-pinene, copaene, and terpinen-4-ol, decreased. Notably, melatonin application at higher concentrations (5 to 25 mu M) elevated essential oil contents, including terpinen-4-ol, eremophila ketone, and copaene. The combination of 15 mu M melatonin and 100 mM NaCl produced the highest levels of d-limonene, alpha-thujene, and gamma-terpinene. Our findings highlighted melatonin's potential to modulate plant growth and improve the biosynthesis of essential oils and terpenoids in H. longiflorus under salt stress in vitro. This research suggests promising strategies to increase the active phytochemicals of H. longiflorus to enhance its pharmacological benefits and the development of natural products.