Accompanied by the increased intake of carbohydrate-rich foods, the utilization of carbohydrate is enhanced across generations of humans, but little is known about its epigenetic mechanism. In this study, zebrafish fed with carbohydrate-rich diets for two months (carbohydrate-programming group, PG), showed the better utilization of carbohydrates than those fed with carbohydrate-normal diets (normal group, NG) in the first and the second high-carbohydrate diet challenge, including the preference for ingesting glucose, and the enhanced carbohydrate absorption and metabolism. The maternal zebrafish were mated with wild type males, and the utilization of carbohydrates was also improved in the offspring from the PG. Through RNA-seq and ATAC-seq of offspring, beside of the higher expression of glut2 gene related to glucose absorption and phip gene related to carbohydrate metabolism, the mRNA level of H3K9me2-specific histone methyltransferase gene ehmt2 was down-regulated, while the demethylase gene kdm4a was significantly up-regulated, and then the protein levels of H3K9me2 was decreased in the PG. Furthermore, the regulatory relationship of H3K9me2 with glut2 and phip was demonstrated by the treatment with the ehmt2 inhibitor BRD4770 in vitro, administration of the kdm4a inhibitor PKF-118-310 in vivo, combining with the methods of dual-luciferase, ChIP and siRNA. Therefore, the improved carbohydrate utilization induced by maternal programming could be inherited through epigenetics, provide new insights into human dietary nutrition plans and therapeutic targets for diabetes.