The excessive inflammation triggered by damage-associated molecular patterns (DAMPs) after myocardial infarction (MI) is responsible for the development of cardiac dysfunction and adverse remodeling, while the mechanisms by which inflammation is fine tuned remain to be fully elucidated. MicroRNA-21 (miR-21) has been shown to function in cardiovascular diseases, while its role in inflammatory responses and cardiac function post MI in mice remains unknown. Here, we found that miR-21 expression was markedly increased in border and infarct areas of cardiac tissues during the early inflammatory phase of MI model established by ligating the left-anterior descending coronary artery. MiR-21 knockout mice had decreased survival rates, worse cardiac dysfunction, and increased infarct and scar areas after MI compared with WT mice. MiR-21 knockout mice showed significantly higher levels of inflammatory cytokines including IL-1β, IL-6, and TNF-α in cardiac tissues, as well as infiltration of CD11b+ monocytes/macrophages with higher expression level of inflammatory cytokines. MI induced the great release of high mobility group protein B1 (HMGB1) and heat shock protein 60 (HSP60) in cardiac tissue. MiR-21 deficiency significantly promoted the inflammatory cytokine production triggered by DAMPs in macrophages, whereas, miR-21 overexpression markedly inhibited the inflammatory cytokine production. Mechanistically, miR-21 deficiency enhanced p38 and NF-κB signaling activation in cardiac tissue post MI and macrophages treated with DAMPs. MiR-21 was found to directly target kelch repeat and BTB (POZ) domain containing 7 (KBTBD7), which promoted DAMP-triggered inflammatory responses in macrophages. Furthermore, KBTBD7 interacted with MKK3/6 and promoted their activation, which in turn enhanced the activation of downstream p38 and NF-κB signaling induced by DAMPs. Therefore, our findings demonstrate that miR-21 attenuates inflammation, cardiac dysfunction, and maladaptive remodeling post MI through targeting KBTBD7 and inhibiting p38 and NF-κB signaling activation, suggesting that miR-21 may function as a novel potential therapeutic target for MI.