We examined the association between cow's milk allergy (CMA) and juvenile idiopathic arthritis (JIA). The material for this case-control study was collected from national registers of all children born in Finland between 2000 and 2010 and diagnosed with JIA (n = 1,298) and age-, sex-, and place-matched controls (n = 5,179). We identified 235 children with CMA; 66 of these children also had JIA. A conditional logistic regression analysis was performed to evaluate the association between CMA and JIA and to test whether exposure to antibiotics would be a covariate for this association. In boys (but not in girls), a diagnosis of CMA and the use of hypoallergenic formula in infancy were associated with the later development of JIA (odds ratio = 2.4, 95% confidence interval: 1.6, 3.6). The association was most evident in boys who were diagnosed with JIA before age 3 years or diagnosed with CMA with predominantly gastrointestinal symptoms. There was no statistically significant additive interaction between CMA and antibiotic exposure in the later development of JIA. These associations may reflect impaired maturation of intestinal immunity and integrity in boys with a risk of JIA. Predisposing factors related to JIA pathogenesis seem to display a sex-linked disparity.