Here, through integrated bioinformatics analyses and machine learning methods, we identified two pivotal immune‐associated candidate genes (Sytl4 and Kcnc2) and constructed a nomogram for diagnosing the obesity‐associated risk in the offspring of mothers with obesity. Here, SYTL4 is linked to obesity due to melanocortin 4 receptor deficiency.