Previous studies indicate resveratrol pretreatment can protect cardiomyocytes. However, it is largely unknown whether resveratrol protects cardiomyocytes when applied at reperfusion. The purpose of this study was to investigate whether resveratrol given at reoxygenation could protect cardiomyocytes under the anoxia/reoxygenation (A/R) condition and to examine the underlying mechanism. In this study, primary cultures of neonatal rat cardiomyocytes were randomly distributed into three groups: control group, A/R group (cultured cardiomyocytes were subjected to 3 h anoxia followed by 2 h reoxygenation), and the resveratrol group (cardiomyocytes were subjected to 3 h anoxia/2 h reoxygenation, and 5, 10 or 20 µM resveratrol was applied 5 min after reoxygenation). In order to evaluate cardiomyocyte damage, cell viability, lactate dehydrogenase (LDH) release, caspase-3 activity, and apoptosis were analyzed by the cell counting kit (CCK)-8 assay, colorimetric method and flow cytometry, respectively. The mRNA and protein expression of Toll-like receptor 4 (TLR4) were detected by quantitative real-time PCR and western blot analysis. Nuclear factor-κB (NF-κB) p65 protein and I-κBα protein levels were also examined by western blot analysis. The levels of proinﬂammatory cytokines in the culture medium were assessed by enzyme-linked immunosorbent assay. We found that resveratrol prevented a reduction in cell viability, decreased the amount of LDH release, attenuated apoptotic cells and decreased caspase-3 activity induced by A/R in cardiomyocytes. Furthermore, resveratrol treatment significantly attenuated the TLR4 expression, inhibited NF-κB activation and reduced the levels of tumor necrosis factor (TNF)-α and interleukin (IL)-1β caused by A/R injury in the culture medium. Treatment with resveratrol shortly after the onset of reoxygenation improves cell survival and attenuates A/R-induced inflammatory response. This protection mechanism is possibly related to the TLR4/NF-κB signaling pathway.