Endoplasmic reticulum (ER) stress is associated with liver injury and fibrosis, and yet the hepatic factors that regulate ER stress-mediated inflammasome activation remain unknown. Here, we report that farnesoid X receptor (FXR) activation inhibits ER stress-induced NACHT, LRR, and PYD domains-containing protein 3 (NLRP3) inflammasome in hepatocytes. In patients with hepatitis B virus (HBV)-associated hepatic failure or non-alcoholic fatty liver disease, and in mice with liver injury, FXR levels in the liver inversely correlated with the extent of NLRP3 inflammasome activation. Fxr deficiency in mice augmented the ability of ER stress to induce NLRP3 and thioredoxin-interacting protein (TXNIP), whereas FXR ligand activation prevented it, ameliorating liver injury. FXR attenuates CCAAT-enhancer-binding protein homologous protein (CHOP)-dependent NLRP3 overexpression by inhibiting ER stress-mediated protein kinase RNA-like endoplasmic reticulum kinase (PERK) activation. Our findings implicate miR-186 and its target, non-catalytic region of tyrosine kinase adaptor protein 1 (NCK1), in mediating the inhibition of ER stress by FXR. This study provides the insights on how FXR regulation of ER stress ameliorates hepatocyte death and liver injury and on the molecular basis of NLRP3 inflammasome activation.