•Ketogenic function was reduced in NAFLD mice with decreased Hmgcs2 expression. This evidence concerns the gene HMGCS2 and metabolic dysfunction-associated steatotic liver disease.