Altered interplay between gut mucosa and dysbiotic bacteria during HIV infection seems to fuel chronic immune dysfunction and might explain the excess rates of human papillomavirus (HPV)-associated anal cancer in HIV-infected individuals. Here, we show in HIV-infected MSM undergoing screening for HPV-related cancer that specific fecal and mucosal bacteria are able to predict the existence of precancerous anal lesions. If confirmed, these bacterial biomarkers could be exploited either as diagnostic tools or therapeutic targets.