Acute lung injury (ALI) is classified as a moderate or mild acute respiratory distress syndrome and is a prominent cause of morbidity and mortality among the critically ill population. Ramelteon is a melatonin receptor agonist with anti-inflammatory and antioxidant effects. The current study investigated the role of ramelteon in lipopolysaccharide (LPS)-induced human pulmonary microvascular endothelial cells (HPMECs) and its potential regulatory mechanisms. A CCK-8 assay was used to examine the effect of ramelteon on the viability of LPS-induced HPMECs, HPMECs treated with ML385 [a Nrf2 inhibitor] and HPMECs treated with SnPP [a HO-1 inhibitor]. The Nrf2/HO-1 signaling pathway was additionally assessed by performing Western blotting. The levels of oxidative stress and inflammatory cytokines in HPMECs were detected using kits and reverse transcription-quantitative PCR. Cell apoptosis was evaluated via TUNEL staining. Furthermore, cell permeability was assessed using a FITC-dextran fluorescent probe, ZO-1 and occludin expression was determined via Western blotting. The results demonstrated that ramelteon elevated HPMEC viability after LPS stimulation. Additionally, ramelteon markedly reduced LPS-induced oxidative stress, inflammation and apoptosis. Moreover, cell permeability was notably decreased in ramelteon-treated groups and was accompanied by upregulated ZO-1 and occludin expression. Ramelteon treatment also activated the Nrf2/HO-1 signaling pathway in LPS-induced HPMECs. Furthermore, the addition of ML385 or SnPP reversed the protective effects of ramelteon on LPS-induced oxidative stress, inflammation, apoptosis and cell dysfunction in HPMECs. Collectively, the results suggested that ramelteon alleviated LPS-induced HPMEC damage by activating the Nrf2/HO-1 signaling pathway, making it an effective treatment for ALI.