Autophagy serves a role in preserving cellular homeostasis. Diabetes mellitus (DM) impairs cardiac autophagy and is associated with an accumulation of cytotoxic proteins that may provoke apoptosis and damage cardiomyocytes. Histone deacetylase (HDAC) inhibitors attenuate cardiac fibrosis and inflammation, and improve cardiomyopathy resulting from DM. However, the effect of HDAC inhibition on autophagy in DM cardiomyopathy has not been investigated. The purpose of the present study was to evaluate whether HDAC inhibition modulates cardiac autophagy and to investigate the potential mechanisms in type 2 DM (T2DM) hearts. Electrocardiography was used to evaluate cardiac function and western blotting was used to evaluate protein expression in autophagy, the serine/threonine protein kinase mTOR (mTOR) signaling pathway, poly adenosine diphosphate ribose polymerase 1 (PARP1), insulin signaling, advanced glycosylation end product‑specific receptor (RAGE), and proinflammatory cytokines in control rats and in rats treated with a high‑fat diet (60% fat) and low‑dose streptozotocin (35 mg/kg) in order to induce T2DM, with or without an HDAC inhibitor (MPT0E014; 50 mg/kg/rat daily for 7 days). Compared with the control rats, T2DM and T2DM rats treated with MPT0E014 exhibited elevated blood glucose levels and similar body weights. However, T2DM rats treated with MPT0E014 and control rats had a smaller left ventricular end‑diastolic diameter compared with the T2DM rats. The control and T2DM rats treated with MPT0E014 had greater protein expression of cardiac phosphorylated (p)‑5' adenosine monophosphate‑activated protein kinase α 2, light chain 3‑II, Beclin‑1, glucose transporter 4, p‑protein kinase B, and insulin receptor substrate‑1 (Ser 307) compared with T2DM rats. In addition, control and T2DM rats treated with MPT0E014 had decreased cardiac protein expression of cleaved PARP1, p‑mTOR‑S2448, p‑P70S6K‑Thr‑389, RAGE, tumor necrosis factor‑α, and interleukin‑6 compared with T2DM rats. The present study demonstrated that MPT0E014 may improve cardiac function in T2DM rats by modulating myocardial autophagy, inflammation and insulin signaling.