Human papillomavirus (HPV) is the most common sexually transmitted infection worldwide and is associated with the risk of anogenital and oropharyngeal cancers. Men who have sex with men (MSM) are at a high risk of HPV infection. However, little up-to-date data are available regarding the prevalence of HIV and HPV co-infection in MSM in Poland. To evaluate the prevalence, genotype distribution and risk factors for HPV infection among HIV-positive MSM living in Lower Silesia. A total of 54 HIV-positive and 28 HIV-negative MSM participated in the study. The polymerase chain reaction was performed to detect HPV from oral and anal swabs. A self-applied written questionnaire was conducted to collect sociodemographic and behavioural data. The prevalence rates of oral and anal HPV infection were higher in HIV-infected MSM than in HIV-negative MSM. Statistical analysis showed that the prevalence of high oncogenic genotypes, HPV 16 and HPV 18, at the anal site was significantly higher in patients with lower CD4 cell counts, in addition, HPV 18 infection was significantly more frequent in patients with higher levels of HIV RNA. Moreover, HPV 33 and HPV 52 at the anal site were significantly more common in patients with lower nadir CD4. This is the first report of HPV infection among Polish HIV-infected MSM. Our results show that HIV-related immunodeficiency is associated with a higher prevalence of high-risk HPV infections, therefore early detection of HIV infection and initiation of antiretroviral therapy might reduce the risk of HPV-related diseases.