This study identified two candidate hub genes (Sytl4 and Kcnc2), developed a nomogram for diagnosing the obesity‐associated risks in offspring and presented a dysregulated proportion of immune cells in the hypothalamus of offspring due to maternal obesity. Here, KCNC2 is linked to obesity due to melanocortin 4 receptor deficiency.