Ischemia reperfusion (IR) injury is a major issue in cardiac transplantation and inflammatory processes play a major role in myocardial IR injury. Necrostatin-1 (Nec-1) is a small molecule capable of inhibiting RIP1 kinase activity and attenuates inflammation-mediated tissue injury. In our study, hearts of C57Bl/6 mice were flushed and stored in cold Bretschneider solution for 8 h and then transplanted into syngeneic recipients. We found that Nec-1 decreased cardiomyocyte necrosis and recruitment of neutrophils and macrophages. Troponin T (TnT) production on 24 h after myocardial IR injury was reduced by Nec-1 administration. Cardiac output at 60 mmHg of afterload pressure was significantly increased in hearts with Nec-1 administration and the cardiac allograft survival in Nec-1-treated animals was significantly prolonged (MST = 90 days in IR + Nec-1 group, P < 0.05 as compared with IR group, MST = 83.5 days). Nec-1 treatment attenuated ROS generation and increased expression of NOS2 and COX-2. The expression of Hmgb1, IL-23, and IL-17A were also decreased with Nec-1 administration. Furthermore, the decreased TnT expression induced by Nec-1 was abrogated with exogenous Hmgb1 administration. In conclusion, Nec-1 played a protective role in cardiomyocyte IR injury, and this was associated with inhibited Hmgb1-IL-23/IL-17 pathway.