The association between HIV pre‐exposure prophylaxis (PrEP) and the natural history of human papillomavirus (HPV) has not been well documented. Our objective was to evaluate the impact of PrEP on the prevalence, incidence, and clearance of anal HPV among men who have sex with men (MSM). Sexually active, HIV‐negative MSM aged 18 years and older in Xinjiang, China since September 1, 2016, were enrolled in an ongoing observational cohort study of HPV. At baseline and every 6 months, an anal swab was taken to test for HPV and a questionnaire on sociodemographic characteristics and sexual behaviors was collected. Those who consented to receive PrEP were enrolled in an open‐label PrEP intervention study from November 1, 2019, to June 30, 2021. This study analyzed data from participants present in the HPV cohort between November 1, 2019, and June 30, 2021. We compared the prevalence, incidence, and clearance of anal HPV between men who received PrEP (PrEP users) and those who did not (non‐PrEP users), and compared men before and after initiating PrEP. We calculated prevalence ratios (PRs), incidence rate ratios (IRRs), and clearance rate ratios (CRRs) for both comparisons. Of the 870 participants present in the HPV cohort during the period between November 1, 2019, and June 30, 2021, 859 had adequate β‐globin for HPV genotype testing and were included in our study. Among them, 429 were PrEP users, while 430 were non‐PrEP users. Median age was 32 years (interquartile range [IQR]: 26–38). Among PrEP users, 217 were tested for anal HPV before PrEP initiation. PrEP users had lower prevalence of HPV 45, 51, and 54 (PRs: 0.27 [95% CI: 0.09–0.80], 0.42 [0.21–0.85], and 0.41 [0.17–0.99], respectively) and lower clearance of HPV 16 (CRR: 0.31 [0.10–0.91]) compared with non‐PrEP users. PrEP users exhibited lower prevalence of HPV 51 (PR: 0.31 [0.12–0.84]), lower incidence of HPV 6, 11, 16, 39 and 61 (IRRs: 0.34 [0.13–0.90], 0.26 [0.08–0.87], 0.44 [0.21–0.91], 0.21 [0.05–0.93], and 0.19 [0.04–0.82], respectively), as well as higher clearance of HPV 52 (CRR: 2.17 [1.08–4.35]) after PrEP initiation. PrEP use may lower the risk of HPV infection among MSM in Xinjiang, China. Our findings further extend the knowledge of the impact of PrEP on sexually transmitted infections.