To study the association between femoral neck (FN) bone mineral density (BMD) T-score and fracture risk in individuals with and without type 2 diabetes (T2D). We performed a single-centre retrospective cohort study using the Danish National Health Service. BMD of the FN was measured by dual-energy X-ray absorptiometry. Cox proportional hazards regression models were used to study the association between FN BMD T-score and fractures in individuals with and without T2D separately, adjusted for age, comorbidities and comedication. The results from this analysis were used to estimate the 10-year absolute fracture risk. In total, there were 35,129 women (2362 with T2D) and 7069 men (758 with T2D). The FN BMD T-score was significantly associated with risk of any, hip and major osteoporotic fracture in men and women with [adjusted hazard risk ratios (aHR) women, hip: 1.57; 95% confidence interval (CI) 1.24-2.00, incidence rate (IR) 8.7; aHR men, hip: 1.55; 95% CI 1.01-2.36, IR 4.6] and without T2D (aHR women, hip: 1.75; 95% CI 1.64-1.87, IR 7.0; aHR men, hip: 1.97, 95% CI 1.73-2.25, IR 6.3), and its ability to predict fracture risk was similar. Fracture IRs were not significantly different for individuals with or without T2D, nor was the estimated cumulative 10-year fracture risk. The FN BMD T-score was significantly associated with hip, non-spine and major osteoporotic fracture risk in men and women with and without T2D. Fracture risk for a given T-score and age was equal in individuals with and without T2D, as was the ability of the FN BMD T-score to predict fracture risk.