Genetic factors play a crucial role in the immune response of juvenile idiopathic arthritis (JIA) and juvenile-onset systemic lupus erythematosus (JSLE). This study aimed to investigate the association of IL12B (rs3212227, rs6887695) and IL17 (rs2275913, rs763780) gene polymorphisms with the susceptibility of JIA and JSLE in Chinese children. A total of 303 healthy controls and 304 patients including 160 JIA and 144 patients were analyzed, and the genetic polymorphisms were genotyped by using a Sequenom MassArray system. There was a significant association between the IL12B rs3212227 genotype and the increased risk of JSLE (P = .01). For rs6887695, the minor allele C was significantly associated with the increased risk of JIA (odds ratio = 1.48, 95% confidence interval [CI] = 1.12–1.95, P = .005). Moreover, rs6887695 genotype was significantly associated with both JIA and JSLE susceptibility (P < .05). Besides, IL12B haplotype GC significantly associated with the increased risk of JIA (P = .016). However, no significant difference was found between the IL17 (rs2275913, rs763780) gene polymorphisms and JIA or JSLE susceptibility (P > .05). And similar genotype distributions of IL12B and IL17 polymorphisms were found between the patients with nephritis and without nephritis in JSLE (P > .05). Our results indicated that IL12B polymorphisms was associated with an increased risk for the development of JIA and JSLE in Chinese children, highlighting the involvement of inflammation in the pathogenesis of JIA and JSLE. Moreover, there was a risk haplotype in IL12B which could increase the risk of JIA.