Background. Previous research has shown that underlying dietary patterns are related to the risk of many different adverse health outcomes, but the relationship of these underlying patterns to skeletal fragility is not well understood. The objective of the study was to determine whether dietary patterns in men (ages 25-49, 50+) and women (pre-menopause, post-menopause) are related to femoral neck bone mineral density (BMD) independently of other lifestyle variables, and whether this relationship is mediated by body mass index. Methods. We performed an analysis of 1928 men and 4611 women participants in the Canadian Multicentre Osteoporosis Study, a randomly selected population-based longitudinal cohort. We determined dietary patterns based on the self-administered food frequency questionnaires in year 2 of the study (1997-99). Our primary outcome was BMD as measured by dual x-ray absorptiometry in year 5 of the study (2000-02). Results. We identified two underlying dietary patterns using factor analysis and then derived factor scores. The first factor (nutrient dense) was most strongly associated with intake of fruits, vegetables, and whole grains. The second factor (energy dense) was most strongly associated with intake of soft drinks, potato chips and French fries, certain meats (hamburger, hot dog, lunch meat, bacon, and sausage), and certain desserts (doughnuts, chocolate, ice cream). The energy dense factor was associated with higher body mass index independent of other demographic and lifestyle factors, and body mass index was a strong independent predictor of BMD. Surprisingly, we did not find a similar positive association between diet and BMD. In fact, when adjusted for body mass index, each standard deviation increase in the energy dense score was associated with a BMD decrease of 0.009 (95% CI: 0.002, 0.016) g/cm2 for men 50+ years old and 0.004 (95% CI: 0.000, 0.008) g/cm2 for postmenopausal women. In contrast, for men 25-49 years old, each standard deviation increase in the nutrient dense score, adjusted for body mass index, was associated with a BMD increase of 0.012 (95% CI: 0.002, 0.022) g/cm2. Conclusions. In summary, we found no consistent relationship between diet and BMD despite finding a positive association between a diet high in energy dense foods and higher body mass index and a strong correlation between body mass index and BMD. Our data suggest that some factor related to the energy dense dietary pattern may partially offset the advantages of higher body mass index with regard to bone health.