The administration of cannabinoid receptor 2 (CB2R) agonist has been reported to produce a cardioprotective effect against the pathogenesis and progression of myocardial infarction (MI). Here in this study, we investigated the specific mechanism related to inflammatory suppression. JWH-133 was used for the activation of CB2R. MI mice models and cardiomyocytes under oxygen-glucose deprivation (OGD) challenge were used for the in vivo and in vitro studies, respectively. Detection of cardiac infarct size and levels of myocardial enzymes as well as echocardiographic examination were applied to assess MI severity and cardiac function. Cell viability and lactate dehydrogenase (LDH) release were detected in vitro. Real-time-polymerase chain reaction (RT-PCR) and enzyme-linked immu- nosorbent assay (ELISA) were used to detect the levels of proinflammatory cytokines. Western blot was used for the analysis of the NOD-like receptor family, pyrin domain containing 3 (NLRP3) inflammasome activation. We found that the administration of CB2R agonist attenuated the severity of MI through reducing infarct size ratio and levels of myocardial enzymes and improved cardiac function in ejection fraction (EF), fractional shortening (FS), left ventricular end-systolic diameter (LVESD), and left ventricular end- diastolic diameter (LVEDD) in MI mice. JWH-133 also produced a cardioprotective effect in murine primary cardiomyocytes by improving cell viability and LDH release. JWH-133 largely reduced the production and secretion of proinflammatory cytokines, which was significantly attenuated by AM630. HU308 showed the same effects as JWH-133. Taken together, we demonstrated for the first time the cardioprotective effect of CB2R agonist and its NLRP3 inflammasome-related mechanism in MI.