Melatonin (N-acetyl-5-methoxytryptamine) plays an important role in plant growth and development, and in the response to various abiotic stresses. However, its role in the responses of barley to low phosphorus (LP) stress remains largely unknown. In the present study, we investigated the root phenotypes and metabolic patterns of LP-tolerant (GN121) and LP-sensitive (GN42) barley genotypes under normal P, LP, and LP with exogenous melatonin (30 μM) conditions. We found that melatonin improved barley tolerance to LP mainly by increasing root length. Untargeted metabolomic analysis showed that metabolites such as carboxylic acids and derivatives, fatty acyls, organooxygen compounds, benzene and substituted derivatives were involved in the LP stress response of barley roots, while melatonin mainly regulated indoles and derivatives, organooxygen compounds, and glycerophospholipids to alleviate LP stress. Interestingly, exogenous melatonin showed different metabolic patterns in different genotypes of barley in response to LP stress. In GN42, exogenous melatonin mainly promotes hormone-mediated root growth and increases antioxidant capacity to cope with LP damage, while in GN121, it mainly promotes the P remobilization to supplement phosphate in roots. Our study revealed the protective mechanisms of exogenous MT in alleviating LP stress of different genotypes of barley, which can be used in the production of phosphorus-deficient crops.