HIV-1 drug resistance can compromise the effectiveness of antiretroviral therapy (ART). A survey of pretreatment HIV-1 drug resistance (PDR) was conducted in Lincang Prefecture of Yunnan Province. From 372 people living with HIV/AIDS initiating ART for the first time during 2017–2018, 322 pol sequences were obtained, of which 11 HIV-1 strain types were detected. CRF08_BC (70.2%, 226/322) was the predominant strain, followed by URF strains (10.6%, 34/322). Drug resistance mutations (DRMs) were detected among 34.2% (110/322) of the participants. E138A/G/K/R (14.3%, 46/322) and V179E/D/T (13.7%, 47/322) were the predominant DRMs. Specifically, E138 mutations commonly occurred in CRF08_BC (19.9%, 45/226). Among the DRMs detected, some independently conferred resistance, such as K65R (1.6%, 5/322), Y188C/F/L (0.9%, 3/322), K103N (0.6%, 2/322) and G190A (0.3%, 1/322), which conferred high-level resistance. The prevalence of PDR was 7.5% (95% CI: 4.6–10.3%) and the prevalence of non-nucleotide reverse transcriptase inhibitor (NNRTI) resistance was 5.0% (95% CI: 2.6–7.4%), which is below the threshold (⩾10%) of initiating a public health response. In conclusion, HIV-1 genetic diversity and an overall moderate level of PDR prevalence were found in western Yunnan. PDR surveillance should be continually performed to decide whether a public health response to NNRTI resistance should be initiated.