Background Cervical cancer (CC) is highly preventable owing to the use of liquid-based cytology combined with human papillomavirus (HPV) screening. Identifying the relationship of vaginal microenvironment and HPV infection with cervical lesions is very important for early prevention of CC. Objective To investigate the relationship of HPV infection and vaginal microenvironment with different grades of cervical lesions. Methods Participants were recruited from Gynecology Center, the First Affiliated Hospital of Xinjiang Medical University from July 2019 to March 2020. All of them performed cervical biopsy and vaginal microenvironment test (assessed using indices including vaginal pH value, leukocyte esterase, H2O2 and coagulase), as well as HPV test. Results There were 1 168 patients in this study, ccording to pathological examination of cervical biopsy, the patients were divided into groups of chronic cervicitis (NC) (n=496), low-grade squamous intraepithelial lesion (LSIL) (n=174), high-grade squamous intraepithelial lesion (HSIL) (n=478), and CC (n=20). The prevalence of HPV infection in LSIL, HSIL, CC, and NC groups was 84.5% (147 cases), 92.7% (443 cases), 95.0% (19 cases) and 75.8% (376 cases). The positive rate of HPV infection among the four groups was statistically significant (χ2=54.209, P4.5 and H2O2 were the influencing factors of cervical lesions (P4.5) and abnormal of H2O2 may be the factors for cervical lesions.