Our study systematically identified two candidate hub genes (Sytl4 and Kcnc2) and developed a nomogram for diagnosing the obesity‐associated risks in offspring through various bioinformatics analyses and machine learning algorithms. Here, KCNC2 is linked to obesity due to melanocortin 4 receptor deficiency.