To explore trends of the association between body mass index (BMI) and age at menarche or spermarche and its urban-rural disparities from 1995 to 2019. A total of 912 753 children and adolescents - including 519 940 9-18 years old girls and 392 813 11-18 years old boys - were involved in six successive cross-sectional surveys conducted across 30 provinces in China from 1995 to 2019. Data on menarche and spermarche was collected using the status quo method, where same-gender physicians conducted face-to-face interviews to determine if children and adolescents had experienced their first menstrual cycle or ejaculation (yes/no). The median age at menarche or spermarche was estimated by probit analysis. Anthropometric measurements measured the height and weight of the study subjects. Children and adolescents were classified into thinness, normal range of weight, overweight, and obesity. t test was used to compare the differences in BMI between premenarchal and postmenarchal girls or prespermarcheal and postspermarcheal boys. Logistic regression was used to explore the associations between BMI/nutritional status and menarche or spermarche stratified by urban or rural residency status. From 1995 to 2019, BMI in all age groups growth over time, and the values of BMI among children and adolescents under 15 who had menarche or spermarche were more significant than those without menarche or spermarche. In 2019, for girls, thinness was associated with delayed menarche (odds ratio (OR) = 0.26; 95% confidence interval (CI) = 0.24-0.28), while overweight (OR = 1.99; 95% CI = 1.85-2.14) and obesity (OR = 2.20; 95% CI = 1.92-2.53) was associated with advanced menarche. For boys, thinness was associated with delayed spermarche (OR = 0.71; 95% CI = 0.65-0.78), overweight was associated with advanced spermarche (OR = 1.08; 95% CI = 1.01-1.15) while obesity had no association with spermarche. The OR between BMI and menarche in 1995 was 1.35 (95% CI = 1.33-1.37), which decreased to 1.19 (95% CI = 1.18-1.20) by 2019. The OR between BMI and spermarche in 1995 was 1.10 (95% CI = 1.09-1.11), which decreased to 1.02 (95% CI = 1.02-1.03) by 2019. The trends by urban-rural stratification were consistent with the total sample. We have established a dose-response relationship between BMI and menarche in girls, whereas the association appears to be nonlinear in boys, and the associations were diminishing. Similar findings were observed in both urban and rural areas. Considering the dual adverse effects of obesity and early puberty on health, the results of this study suggest that sexual health education should be strengthened, especially among obese girls. Further research on the influencing factors and biological mechanisms of early puberty will be beneficial.