Cardiac remodeling and dysfunction are responsible for the high mortality after myocardial infarction (MI). We assessed the potential for Shank3 to alleviate the post-infarction cardiac dysfunction. The experimental MI mice model was constructed by left anterior descending coronary artery ligation. Shank3 knockout aggravated cardiac dysfunction after MI, while Shank3 overexpression alleviated it. The histological examination showed that the infarct size was significantly increased in the acute phase of MI in the Shank3 knockout group, and the cardiac dysfunction of the Shank3 knockout group was even more severe than the Shank3 overexpression group, revealed by echocardiography analyses. In vitro, cultured neonatal cardiomyocytes were subjected to simulated MI. Shank3 downregulation curbed LC3 expression and autophagosome-lysosome fusion. Furthermore, Shank3 downregulation increased cardiomyocyte apoptosis. In contrast, Shank3 upregulation induced autophagy, and inhibited apoptosis under hypoxia. In vivo, western blot analysis showed decreased levels of Atg7, Beclin1, LC3-II, and Bcl-2 as well as increased expression of p62, cleaved caspase-3, and cleaved caspase-9 in the Shank3 knockout group which suffered from MI. On the other hand, it also revealed that Shank3 overexpression induced autophagy and inhibited apoptosis after MI. Shank3 may serve as a new target for improving cardiac function after MI by inducing autophagy while inhibiting apoptosis.