Abstract Aim Myocardial infarction (MI) is a severe disease with increased mortality and disability rates, posing heavy economic burden for society. Exosomes were uncovered to mediate intercellular communication after MI. This study aims to explore the effect and mechanism of lncRNA KLF3-AS1 in exosomes secreted by human mesenchymal stem cells (hMSCs) on pyroptosis of cardiomyocytes and MI. Methods Exosomes from hMSCs were isolated and identified. Exosomes from hMSCs with transfection of KLF3-AS1 for overexpression were injected into MI rat model or incubated with hypoxia cardiomyocytes. Effect of KLF3-AS1 on MI area, cell viability, apoptosis, and pyroptosis was determined. The relationship among miR-138-5p, KLF3-AS1, and Sirt1 was verified by dual-luciferase reporter assay. Normal cardiomyocytes were transfected with miR-138-5p inhibitor or sh-Sirt1 to clarify whether alteration of miR-138-5p or sh-Sirt1 can regulate the effect of KLF3-AS1 on cardiomyocytes. Results Exosomes from hMSCs were successfully extracted. Transfection of KLF3-AS1 exosome in rats and incubation with KLF3-AS1 exosome in hypoxia cardiomyocytes both verified that overexpression of KLF3-AS1 in exosomes leads to reduced MI area, decreased cell apoptosis and pyroptosis, and attenuated MI progression. KLF3-AS1 can sponge miR-138-5p to regulate Sirt1 expression. miR-138-5p inhibitor transfection and KLF3-AS1 exosome incubation contribute to attenuated pyroptosis and MI both in vivo and in vitro, while transfection of sh-Sirt1 could reverse the protective effect of exosomal KLF3-AS1 on hypoxia cardiomyocytes. Conclusion LncRNA KLF3-AS1 in exosomes secreted from hMSCs by acting as a ceRNA to sponge miR-138-5p can regulate Sirt1 so as to inhibit cell pyroptosis and attenuate MI progression.