Conclusions: Targeting the cardiac vagus nerve by optogenetic stimulation induced macrophage M2 polarization by activating the IL-10/STAT3 signaling pathway, which obviously optimized the regenerative microenvironment and then improved cardiac function after MI. This evidence concerns the gene IL10 and myocardial infarction.