Cardiac dysfunction is a significant manifestation of sepsis and it is associated with the prognosis of the disease. Astaxanthin (ATX) has been discovered to serve a variety of pharmacological effects, including anti‑inflammatory, antioxidant and antiapoptotic properties. The present study aimed to investigate the role and mechanisms of ATX in sepsis‑induced myocardial injury. Male C57BL/6 mice were divided into three groups (15 mice per group): Control group, lipopolysaccharide (LPS) group and LPS + ATX group. The cardiac dysfunction model was induced through an intraperitoneal injection of LPS (10 mg/kg) and ATX (40 mg/kg) was administered to the LPS + ATX group by intraperitoneal injection 30 min following the administration of LPS. All animals were sacrificed after 24 h. Inflammatory cytokine levels in the serum were detected using ELISAs, and cardiac B‑type natriuretic peptide (BNP) levels were analyzed using western blot analysis and reverse transcription‑quantitative PCR. Furthermore, the extent of myocardial injury was evaluated using pathological analysis, and cardiomyocyte apoptosis was analyzed using a TUNEL assay, in addition to determining the expression levels of Bcl‑2 and Bax. The expression levels of proteins involved in the mitogen activated protein kinase (MAPK) and PI3K/AKT signaling pathways were also analyzed using western blot analysis. ATX significantly suppressed the LPS‑induced increased production of TNF‑α and IL‑6 and suppressed the protein expression levels of BNP, Bax and Bcl‑2 to normal levels. ATX also prevented the histopathological changes to the myocardial tissue and reduced the extent of necrosis. Furthermore, the treatment with ATX suppressed the LPS‑activated MAPK and PI3K/AKT signaling. ATX additionally exerted a protective effect on cardiac dysfunction caused by sepsis by inhibiting MAPK and PI3K/AKT signaling.