Background. Sepsis-induced cardiomyopathy (SIC) is a sort of severe disease in the intensive care unit. This research focuses on exploring the influence of miR-340-5p on SIC and its specific mechanism. Methods. Mice were administered with lipopolysaccharide (LPS) to construct a SIC animal model. Mice were intramyocardially injected with Adenoassociated Virus- (AAV-) 9 containing the miR-340-5p precursor to make the miR-340-5p overexpression in the myocardium. The expression level of myocardial miR-340-5p was evaluated by qRT-PCR. The cardiac function was measured by echocardiography, the myocardial morphology was observed by hematoxylin-eosin (HE) staining, and the oxidative stress level was detected by 4-hydroxynonenal (4-HNE) immunohistochemical staining and malondialdehyde (MDA) assay in mice. The cells were pretreated with miR-340-5p mimic, mimic-NC, miR-340-5p inhibitor, inhibitor-NC, MyD88 siRNA, or si-NC and then administered with LPS or PBS. The cell viability was measured with the CCK-8 assay. The level of intracellular oxidative stress was evaluated using reactive oxygen species (ROS), MDA, and glutathione (GSH) detection. The MyD88 level was assessed via Western blotting analysis. The interaction of miR-340-5p with the MyD88 mRNA was confirmed via dual-luciferase reporter assay and RNA pull-down assay. Results. The miR-340-5p overexpression partially alleviated the increase of the MyD88 level, impairment of cardiac function, and oxidative stress injury in the SIC animal model. In the SIC cell model, miR-340-5p mimic pretreatment partially relieved oxidative stress injury, while the miR-340-5p inhibitor had the opposite effect. Besides, the miR-340-5p mimic and inhibitor could reduce and further increase the MyD88 level in the SIC cell model, respectively. Dual-luciferase reporter and RNA pull-down experiments confirmed the interaction between the MyD88 mRNA and miR-340-5p. Finally, it was found that MyD88 siRNA pretreatment also partially alleviates the oxidative stress injury in the SIC cell model. Conclusion. In sum, our study demonstrated that miR-340-5p can improve myocardial oxidative stress injury by targeting MyD88 in SIC.