Although current evidence emphasizes a high prevalence of vitamin D deficiency and an inverse association between serum 25‐hydroxyvitamin D (25‐OHD) concentration and obesity, no studies have been conducted in Mexican children. The objective was to determine the prevalence of vitamin D deficiency and its association with obesity and lifestyle factors in a sample of school‐aged Mexican children. A cross‐sectional study of 99 obese and 99 nonobese 6–12 year‐old children, skin phototypes III–V, from six public schools was conducted during summer at latitude 25°40′, in northeastern Mexico. Anthropometric measurements were determined. Serum 25‐OHD was measured by immunoluminometric direct assay. Consumption of foods rich in vitamin D, sunscreen use and vitamin consumption were assessed through applied questionnaires. 62.1% of the subjects had insufficiency of 25‐OHD (21–29 ng/ml) and 20.2% had deficiency (<20 ng/ml). Obese subjects (BMI ≥95th percentile for age and gender) had significantly lower concentration of 25‐OHD than nonobese. Predictors of 25‐OHD concentration were, in order of significance: percentage of body fat, BMI, triceps skin fold, and waist circumference (WC). A significantly higher rate of 25‐OHD deficiency was observed in children with inadequate milk/yoghurt consumption, but no difference was found for other foods, physical activity (PA) or screen‐time. In a multivariate model, being obese was significantly associated with the risk of 25‐OHD deficiency, after adjustment for PA, screen‐time, skin phototype, ingestion of milk/yoghurt, fish, cheese, and carbonated beverages. A high prevalence of vitamin D deficiency and an inverse association between serum 25‐OHD concentration and obesity was found.