Objective To observe the effect of nicorandil on septic rats and explore the possible mechanism of its myocardial protection, so as to provide theoretical basis for the treatment of septic cardiomyopathy. Methods Sixty male clean SD rats were selected as the research objects and randomly divided into 3 groups by random number method: sham operation group (sham group), cecal ligation and perforation group (CLP group), nicorandil treatment group (nicorandil+CLP group). After the operation, the nicorandil group was pumped with nicorandil diluent 1 ml/h (2 mg/kg/h) with a micropump for 6 hours. The sham group and CLP group were pumped with the same amount of normal saline 1 ml/h for a total of 6 hours. After 24 hours, the survival of the rats in each group was observed. The expression of troponin I (cTnI), tumor necrosis factor α (TNF-α), and interleukin-1β (IL-1β) in the serum was detected. Then, the ventricle was harvested for the observation of the pathological changes of myocardium. Quantitative real-time polymerase chain reaction and immunostaining were used to detect myocardial tissue apoptosis, and Western blot methods were used to detect protein expression changes in nuclear factor-κB (NF-κB) pathways. Results 24 hours after operation, the survival rate of the rats in the CLP group was 60%. There was a large amount of necrosis of myocardial cells and inflammatory cell infiltration. The survival rate of rats in the nicorandil+CLP group was 75%. Compared with the CLP group, the necrosis of myocardial cells was reduced, and there was still a small amount of inflammatory cell infiltration. In the CLP group, myocardial inflammation and apoptosis were significant, and NF-κB pathway was activated. On the contrary, the NF-κB pathway in the nicorandil+CLP group was inhibited, and the expression of inflammatory factors and apoptosis factors was inhibited. Conclusion Nicorandil can reduce the release of inflammatory factors in septic rats, improve the inflammatory response, reduce myocardial damage, and play a myocardial protective effect. Its mechanism may be related to the inhibition of the activation of NF-κB signaling pathway.