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. This evidence concerns the gene KCNC2 and obesity disorder.