This study aimed to evaluate the association between macronutrient intake and bone mineral density (BMD) using non-substitution and substitution statistical approaches. Longitudinal analysis. 1,317 adults in the Health Worker Cohort Study in Mexico. These participants were assessed at baseline (2004-2006) and follow-up (2010-2012). Dietary intakes were assessed using validated food frequency questionnaires. BMD at the different sites was performed by dual-energy X-ray absorptiometry (DXA). Hybrid-mixed effects regression models were performed to evaluate the associations of interest. Cross-sectional associations were found between fiber intake and higher total hip and femoral neck BMD in women and longitudinal associations with loss of femoral neck BMD in men. An increase in 5% energy intake from carbohydrate was associated with a BMD loss at several site in women and total hip and femoral neck in men. In both sexes, an increase in 5% energy intake of animal protein or fat was associated with a site-specific BMD gain after six years. Substitution analysis showed that the energy intake replacement from fat or carbohydrate by protein had an increase in BMD at different sites in women; while in men, it was only significant when replacing carbohydrate. Substitution of protein or fat by carbohydrates was associated with lower BMD in women, and only protein replacement by carbohydrates in men. Our findings suggest that carbohydrate intake was associated with loss of BMD, while animal protein and fat intake was associated with gain of BMD among the Mexican population. Macronutrient substitutions resulted in significant associations; however, additional studies are needed to confirm these findings.