Obesity promotes nonalcoholic fatty liver disease (NAFLD). The intestinal microbiota contributes to NAFLD progression through a gut-to-liver pathway that promotes inflammation and fibrosis. Gut microbiota-derived factors can travel to the liver and activate immune responses in liver resident cells to promote inflammation and NAFLD. Little is known about bacterial sensors or immune responses that can protect against NAFLD. We tested whether the bacterial cell wall sensor nucleotide-binding oligomerization domain-containing (NOD)2 protects against diet-induced NAFLD in mice. Whole body deletion of NOD2 exacerbated liver steatosis and fibrosis in mice fed a NAFLD-promoting diet. Mice with a hepatocyte-specific deletion of NOD2 ( Nod2−/−HKO) also had higher liver steatosis and fibrosis compared with littermate wild-type mice (WT) fed a NAFLD-promoting diet. Hepatocyte-specific NOD2 deletion altered the composition of the gut microbiome. Nod2−/−HKO mice had increased relative abundance of Clostridiales and lower Erysipelotrichaceae among other changes in cecal bacteria compared with littermate WT mice. Hepatocyte-specific NOD2 deletion altered a transcriptional program of liver inflammation, metabolism, and fibrosis. Nod2−/−HKO mice had higher levels of transcripts involved in lipid and cholesterol metabolism. Nod2−/−HKO mice had higher transcript levels of transforming growth factor-β and collagen isoforms, which coincided with higher levels of liver collagen compared with WT mice. These data show that bacterial cell wall sensing within hepatocytes can engage retrograde cross-talk from the liver to the gut, where liver immunity communicates with the gut to influence the intestinal host-microbe relationship during diet-induced NAFLD, and NOD2 within the hepatocyte confers protection from liver steatosis and fibrosis.