BACKGROUND: To describe the associations of endogenous sex hormones with the prevalence and occurrence of knee osteoarthritis (KOA) in women. METHODS: We included 178,280 women (mean 56.0 years) from the UK Biobank who had data on sex hormone-binding globulin (SHBG), testosterone, or estradiol at baseline. Outcomes were the prevalence of KOA at baseline and incident KOA during the follow-up. We performed logistic regression and accelerated failure time models to explore the linear and nonlinear associations between endogenous sex hormone levels (per 1 standard deviation [SD] and in quartiles) and the prevalence and occurrence of KOA. RESULTS: At baseline, women with higher testosterone levels were less likely to have KOA (odds ratios=0.91 per 1 SD increase in testosterone, 95% confidence interval 0.87-0.96). No evidence for disparity differences in SHBG or estradiol between women with and without KOA was found. For participants without KOA at baseline, the time to incident KOA was extended in women with higher testosterone at baseline (time ratio=1.04 per 1 SD increase in testosterone, 95% confidence interval 1.01-1.06) during a median follow-up of 13.6 years. We did not find evidence of nonlinear associations of sex hormones with the prevalence and occurrence of KOA after adjustment for multiple comparisons. CONCLUSIONS: In middle-aged and older women, the risk of KOA is inversely associated with endogenous testosterone but not with SHBG or estradiol.