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