The increasing prevalence of human immunodeficiency virus (HIV) drug resistance mutations (HIVDRM) in untreated seropositive persons has consequences for future treatment options. This is extremely important in key populations such as female sex workers (FSWs), where the prevalence of pretreatment drug resistance (PDR) and associated risk factors are unknown. In this study, we analyzed PDR and associated risk factors in recently diagnosed and treatment-naive FSWs in Nairobi, Kenya. In this cross-sectional study, we used 64 HIV-seropositive plasma samples collected from FSWs between November 2020 and April 2021. To identify HIVDRM, the pol gene was amplified and genotyped using sanger sequencing. The effects of age, tropism, CD4+ T cell count, subtype, and location on HIVDRM counts were examined using Poisson regression. Overall, the prevalence of PDR was 35.9% (95% CI: 24.3–48.9), which was strongly influenced by K103N and M184V mutations, which confer resistance to non-nucleoside reverse transcriptase inhibitors (NNRTIs) and nucleoside reverse transcriptase inhibitors (NRTI), respectively. Subtype A1 was predominant followed by subtype D with a notable increase in inter-subtype recombinants. We found statistically significant evidence that age was inversely related to HIVDRM. A FSW who is 1 year older had 12% less HIVDRM (incidence rate ratios [IRR]: 0.88; 95% CI: 0.82–0.95; P < .001), after adjusting for CD4+ T cell count, subtype, location, and tropism. Similarly, an increase in CD4+ T cell count by 1 unit, was associated with 0.4% fewer HIVDRM (IRR: 0.996; 95% CI: 0.994–0.998; P = .001), while controlling for the other variables. HIV-1 tropism was not associated with HIVDRM counts. In conclusion, our findings show a high prevalence of NNRTIs. Lower CD4+ T cell counts and younger age were significant risk factors that influenced HIVDRM loads. This finding underscores the relevance of targeted interventions and the importance of continuing to focus on FSWs as a way of addressing the HIV epidemic.