This article examined the therapeutic effect of melatonin (MT) on the lipopolysaccharide (LPS)-induced myocardial injury, and the mechanisms involved. Septic rat model was constructed by exposing to lipopolysaccharide (LPS), and treated by MT, Ferrostatin-1 (Fer-1) and Erastin (Era). Hematoxylin-eosin staining was executed to appraise myocardial injury. H9c2 cells that exposed to LPS to induce in vitro sepsis cell model were treated by MT. p53 overexpression vectors were transfected into H9c2 cells. Inflammation- and ferroptosis-related indicators were examined by enzyme-linked immunosorbent assay. Expression of p53, xCT and GPX4 was scrutinized by quantitative real-time polymerase chain reaction and Western blot. MT relieved myocardial injury in septic rats. It decreased IL-6 and TNF-α, elevated GPX4 and GSH, and reduced MDA and Fe