Ketogenic diet (KD) may benefit patients with liver cancer, but the underlying mechanism of its anti-cancer effect remains an open issue. This work aimed to explore the influence of simulated KD on the proliferation and migration of cultured hepatoma cells. The low-glucose medium supplemented with β-hydroxybutyrate (BHB-Glow) was utilized to simulate clinical KD treatment. Western blot was utilized for detecting the expression of glycolysis-related proteins, Seahorse XF96 for oxygen consumption rate (OCR) and extracellular acidification rate (ECAR), and ELISA for insulin content. Expression of FOXC2 in liver cancer cells was analyzed by bioinformatics and qPCR. Cell Count Kit-8 (CCK-8) testing kit was utilized for testing cell viability. KD treatment significantly reduced the expression of glycolysis-related proteins in Huh-7 cells, inhibited insulin production in β islet cells, reduced ECAR, and increased OCR. FOXC2 was significantly up-regulated in Huh-7 cell line, and sh-FOXC2 hindered the proliferation and migration of Huh-7 cells. The exogenous addition of insulin promoted the malignant progression of Huh-7 cells. Together, the medium simulating KD environment strengthened the protection of liver cancer cells by reducing insulin production and down-regulating FOXC2 expression. This study confirmed through in vitro cell experiments that KD could inhibit the proliferation and migration of liver cancer cells by targeting down regulation of insulin and FOXC2 expression, providing new theoretical basis for the treatment of liver cancer patients.