Purpose The association between long-acting insulin analogs and increased breast cancer risk is uncertain, particularly with the short follow-up in previous studies. We assessed this risk long term in women with type 2 diabetes. Methods A population-based cohort of women 40 years or older, all of whom were treated with long-acting (glargine, detemir) or neutral protamine Hagedorn (NPH) insulin between 2002 and 2012, was formed using the United Kingdom's Clinical Practice Research Datalink. Women were followed until February 2015 or breast cancer diagnosis. Cox proportional hazards models were used to estimate adjusted hazard ratios (HRs) and 95% CIs of incident breast cancer, comparing long-acting insulin analogs with NPH overall, as well as by duration and cumulative dose. Results The cohort included 22,395 women who received insulin treatment, with 321 incident breast cancer events occurring during up to 12 years of follow-up (incidence rate 3.3 per 1,000 person-years). Compared with NPH insulin, insulin glargine was associated with an increased risk of breast cancer (HR, 1.44; 95% CI, 1.11 to 1.85), mainly increasing 5 years after glargine initiation (HR, 2.23; 95% CI, 1.32 to 3.77) and after > 30 prescriptions (HR, 2.29; 95% CI, 1.26 to 4.16). The risk was particularly elevated among prior insulin users (HR, 1.53; 95% CI, 1.10 to 2.12) but not for new users, which included fewer patients and for which one cannot rule out an HR of 1.81. The risk associated with insulin detemir was not significantly elevated (HR, 1.17; 95% CI, 0.77 to 1.77). Conclusion Long-term use of insulin glargine is associated with an increased risk of breast cancer in women with type 2 diabetes. The risk associated with insulin detemir remains uncertain because there are fewer users of this insulin.