To explore the effect of ketogenic diet (KD) on β-cell dedifferentiation and hepatic lipid accumulation in db/db mice. After a 3-week habituation, male db/db mice aged 8 weeks were assigned into normal diet (ND) group, KD group and 75% calorie restriction (CR) group, with free access to standard diet, KD and 75% of standard diet, respectively. In addition, sex-matched 8-week-old C57BL/6 mice were used to construct a control (C) group. After a 4-week dietary intervention, mouse body weight, fasting blood glucose (FBG), blood lipids, fasting insulin (FINS), glucose tolerance and β-hydroxybutyric acid level were measured. The morphologies of islet and liver were observed by H&E staining. Positive expressions of β-cell specific transcription factors in mouse islets were determined by double immunofluorescence staining. The size and number of lipid droplets in mouse liver were examined by oil red O staining. Relative levels of adipogenesis-associated and lipolysis-associated genes in mouse liver were detected by qRT-PCR. In addition, expressions of CD36 protein in the mouse liver were determined by immunohistochemical staining and Western blot. After a 4-week dietary intervention, FBG, FINS and glucose area under the curve in KD group became significantly lower than those in ND group (all P<0.05). A regular morphology of mouse islet was observed in KD group, with an increased number of islet cells. KD significantly reversed the decrease in β-cell number, disarrangement of β-cells, decline of β/α-cell ratio and downregulation of β-cell specific transcription factors in db/db mice. Serum levels of triglyceride, total cholesterol and low-density lipoprotein cholesterol were comparable between ND and KD groups, while serum triglyceride level was significantly lower in CR group than in ND group (P<0.05). Vacuolar degeneration and lipid accumulation in the liver were more prominent in KD group than in ND and CR groups. The mRNA levels of Pparα and Acox1 in KD group were lower than those in ND group, although no significant differences were detected. Relative levels of Cd36 and inflammatory genes in the mouse liver were significantly higher in KD group than in ND group (all P<0.05). KD significantly reduces FBG and FINS, and improves glucose tolerance in db/db mice by upregulating β-cell specific transcription factors and reversing β-cell dedifferentiation. However, KD also induces hepatic lipid accumulation and aggravates inflammatory response in the liver of db/db mice.