Background: Resveratrol (RES) can induce macrophage polarization to achieve the immune response. Objectives: In this study, we aimed to determine whether RES attenuates inflammation by regulating macrophage polarization through inhibition of toll-like receptor 4 (TLR4)/MyD88 signaling. Materials and Methods: We measured the effects of different concentrations of RES on cellular activity of RAW264.7 and measured it using the methyl thiazolyl blue tetrazolium bromide method. The immunomodulatory effects of RES on lipopolysaccharide (LPS)-induced RAW264.7 cells were detected by measuring the levels of nitric oxide (NO), interleukin (IL)-6, and tumor necrosis factor (TNF)-α. The quantitative real-time polymerase chain reaction (RT-qPCR) was used to detect the markers of M1 and M2 polarization of macrophages. The changes in the expression of both mRNA and proteins related to the TLR4/ myeloid differentiation factor 88 (MyD88) receptor pathway detected by Western blot (WB) and RT-qPCR analyses. Results: According to our results, 2, 4, and 8 μmol/L RES decreased the levels of NO, IL-6, and TNF-α in LPS-induced RAW264.7 cells, thereby reducing inflammation and increasing immunity. IL-1 and inducible NO synthase, which are the markers of M1-type macrophages, were increased by LPS, and arginase-1, CD206, which are the markers of M2-type macrophages, were decreased. However, in LPS-induced RAW264.7 cells incubated with RES, we observed the opposite results for both M1-and M2-type macrophage markers. Proteins and mRNA related to the TLR4 pathway were detected by WB and RT-qPCR analysis and TLR4, P65, MyD88, interleukin receptor-associated kinases 1, tumor necrosis factor receptor associated factor 6, activated kinase 1, and IKKβ were significantly increased by LPS. In contrast, when the cells were incubated with RES, the TLR4 pathway-related proteins and mRNA were significantly decreased and showed a volume-response relationship. Conclusion: RES can polarize M1-type macrophages to M2-type macrophages and regulate them through the TLR4/MyD88 receptor pathway. The polarization of macrophages can reduce the level of inflammation and regulate the immune system.