The ketogenic diet (KD) has been widely applied as a therapeutic intervention for metabolic and neurological disorders, including epilepsy. Although ketone bodies such as β-hydroxybutyrate (βHB) and acetoacetate are considered key mediators of the beneficial effects of KD, the underlying molecular mechanisms remain incompletely understood. In this study, we focused on GPR109A, a receptor for βHB, whose physiological role in metabolic tissues has not been fully elucidated. We compared two distinct ketogenic conditions—ketogenic diet feeding and fasting—to dissect the effects of ketone body signaling under nutrient-rich and nutrient-deprived states. Under KD conditions, Gpr109a-deficient mice exhibited pronounced hepatic lipid accumulation accompanied by increased macrophage infiltration, leading to enhanced liver inflammation. In contrast, during short-term fasting, loss of GPR109A did not result in significant hepatic lipid deposition or inflammatory responses, despite comparable induction of ketone body production. These findings indicate that the metabolic function of GPR109A is highly dependent on nutritional context rather than ketone body availability alone. Further mechanistic analyses indicated that GPR109A confers hepatoprotection during KD by preserving intestinal barrier integrity along the gut–liver axis. In Gpr109a-deficient mice fed a KD, hepatic expression of pathogen-associated molecular pattern (PAMP)–related genes was markedly increased, accompanied by a significant reduction in intestinal barrier integrity in the colon. Moreover, antibiotic treatment abolished KD-induced hepatic inflammation in Gpr109a-deficient mice. These results suggest that liver pathology under KD conditions is primarily driven by the translocation of microbiota-derived inflammatory mediators. In other words, the high fat content of the ketogenic diet compromises intestinal tight junction integrity, whereas ketone bodies counteract this effect through GPR109A-dependent signaling. In contrast, under non-overnutrition conditions such as fasting, intestinal barrier function remains largely intact, meaning that GPR109A is not required for hepatic protection. Collectively, our findings identify GPR109A as a critical mediator of the organ-protective effects of ketone bodies and highlight its therapeutic potential as a target for mitigating diet-induced metabolic stress and associated inflammatory disorders.