Metabolic dysfunction–associated steatohepatitis (MASH) is regulated by complex interplay between the macrophages and surrounding cells in the liver. Here, we show that Atf3 regulates glucose-fatty acid cycle in macrophages attenuates hepatocyte steatosis, and fibrogenesis in hepatic stellate cells (HSCs). Overexpression of Atf3 in macrophages protects against the development of MASH in Western diet–fed mice, whereas Atf3 ablation has the opposite effect. Mechanistically, Atf3 improves the reduction of fatty acid oxidation induced by glucose via forkhead box O1 (FoxO1) and Cd36. Atf3 inhibits FoxO1 activity via blocking Hdac1-mediated FoxO1 deacetylation at K242, K245, and K262 and increases Zdhhc4/5-mediated CD36 palmitoylation at C3, C7, C464, and C466; furthermore, macrophage Atf3 decreases hepatocytes lipogenesis and HSCs activation via retinol binding protein 4 (Rbp4). Anti-Rbp4 can prevent MASH progression that is induced by Atf3 deficiency in macrophages. This study identifies Atf3 as a regulator of glucose-fatty acid cycle. Targeting macrophage Atf3 or Rbp4 may be a plausible therapeutic strategy for MASH.