Inflammation plays an essential role in the pathogenesis of non-alcoholic fatty liver disease (NAFLD). Berberine (BBR), an isoquinoline alkaloid isolated from Chinese medicinal herbs, has been widely used to treat various diseases, including liver diseases for hundreds of years. The previous studies have shown that BBR inhibits high fat-diet-induced steatosis and inflammation in rodent models of NAFLD. However, the underlying molecular mechanisms remain unclear. This study is aimed to identify the potential mechanisms by which BBR inhibits free fatty acid (FFA) and LPS-induced inflammatory response in mouse macrophages and hepatocytes. Mouse RAW264.7 macrophages and primary mouse hepatocytes were treated with palmitic acid (PA) or LPS or both with or without BBR (0-10 μM) for different periods (0-24 h). The mRNA and protein levels of proinflammatory cytokines (TNF-α, IL-6, IL-1β, MCP-1) and ER stress genes (CHOP, ATF4, XBP-1) were detected by real-time RT-PCR, Western blot and ELISA, respectively. The results indicated that BBR significantly inhibited PA and LPS-induced activation of ER stress and expression of proinflammatory cytokines in macrophages and hepatocytes. PA/LPS-mediated activation of ERK1/2 was inhibited by BBR in a dose-dependent manner. In summary, BBR inhibits PA/LPS-induced inflammatory responses through modulating ER stress-mediated ERK1/2 activation in macrophages and hepatocytes.