Menstrual cycle dysfunction is associated with insulin resistance, a key feature early in the pathogenesis of type 2 diabetes. However, the evidence linking irregular and long menstrual cycles with type 2 diabetes is scarce and inconsistent. To evaluate the associations between menstrual cycle characteristics at different points throughout a woman's reproductive life span and risk of type 2 diabetes and the extent to which this association is modified by lifestyle factors. This prospective cohort study included 75 546 premenopausal US female nurses participating in the Nurses' Health Study II from 1993 to June 30, 2017. Data analysis was performed from February 1 to December 30, 2019. Self-reported usual length and regularity of menstrual cycles at the age ranges of 14 to 17 years, 18 to 22 years, and 29 to 46 years. Incident type 2 diabetes identified through self-report and confirmed by validated supplemental questionnaires. Among the 75 546 women in the study at baseline, the mean (SD) age was 37.9 (4.6) years (range, 29.0-46.0 years). A total of 5608 participants (7.4%) had documented new cases of type 2 diabetes during 1 639 485 person-years of follow-up. After adjustment for potential confounders, women reporting always having irregular menstrual cycles between the age ranges of 14 to 17 years, 18 to 22 years, and 29 to 46 years were, respectively, 32% (95% CI, 22%-44%), 41% (95% CI, 23%-62%), and 66% (95% CI, 49%-84%) more likely to develop type 2 diabetes than women reporting very regular cycles (within 3-4 days of expected period) in the same age range. Similarly, women reporting a usual cycle length of 40 days or more between the age ranges of 18 to 22 years and 29 to 46 years were, respectively, 37% (95% CI, 19%-57%) and 50% (95% CI, 36%-65%) more likely to develop type 2 diabetes during follow-up compared with women reporting a usual cycle length of 26 to 31 days in the same age ranges. These associations appeared to be stronger among women with overweight or obesity, a low-quality diet, and low levels of physical activity. The relative excess risk of type 2 diabetes due to the interaction between irregular and long menstrual cycles and the overall unhealthy lifestyle score was 0.73 (95% CI, 0.57-0.89) and 0.68 (95% CI, 0.54-0.83), respectively. In this cohort study of US female nurses participating in the Nurses' Health Study II, irregular and long menstrual cycles throughout life were associated with a greater risk of type 2 diabetes, particularly among women with overweight or obesity, a low-quality diet, and low levels of physical activity.