Inflammatory response-mediated excessive apoptosis is the main pathological alteration in the development of diabetic cardiomyopathy (DCM). The role of astragaloside IV (AS-IV) in the treatment of DCM is still unclear. In vivo model was established by high-fat diet plus 1% STZ, and in vitro model was established by 30 mmol/L glucose. AS-IV reduced fasting blood glucose, improved cardiac function and cardiac pathology, and decreased the excessive deposition of myocardial interstitial collagen. In addition, AS-IV inhibited the protein levels of TLR4, MYD88, NF-κB p65, Caspase-3, TGF-β and Colleagn I, and TNF-α and IL-1β activities. Moreover, AS-IV also inhibited the overactivation of TLR4/MyD88/NF-κB signaling pathway and apoptosis of cardiomyocytes induced by high-glucose in H9c2 cells and myocardial fibroblasts. In conclusion, AS-IV can inhibit the over-activation of TLR4/MyD88/NF-κB signaling pathway, inhibit the inflammatory response, anti-apoptosis, which has a significant prevention and treatment effect on DCM.