Human papillomavirus (HPV) infection is linked to several cancers, including anal and oral cancers. The incidence of anal cancer is particularly high among HIV-positive men who have sex with men (MSM). DNA methylation markers have shown promise as biomarkers for identifying precancerous lesions and cancer in HPV-infected individuals. The aim of this study was to investigate the correlation of DNA methylation with HPV infection in oral samples and the correlation of DNA methylation with lesion degree in the anal samples of HIV-positive MSM. This study investigated DNA methylation in oral and anal samples from HIV-positive MSM at the National Institute for Infectious Diseases (INMI) in Rome, Italy. Exfoliated oral epithelial cells and anal samples were collected and analyzed for 28 HPV genotypes using the Allplex 28 HPV assay. DNA methylation was assessed with the PrecursorM+ kit for oral samples and the AnoGyn kit for anal samples, focusing on the promoter regions of specific genes. The study included 63 participants, with a median age of 49 and a median CD4+ count of 705 cells/µL. The oral samples showed HPV16 as the most common type, with 22% testing positive for DNA methylation. The anal samples exhibited HPV-related methylation changes linked to cytological lesions, with a 30% increase in the observed ddCt ratio. Significant differences were found in both ASCL1 and ZNF582 genes, particularly for HSILvsNILM and HSILvsLSIL lesions. Of the samples with an increased ddCt ratio, 80% were from patients over 35 years old, and multiple HPV infections were common. DNA methylation markers could be valuable in identifying high-risk HPV infections in oral samples and detecting potential precancerous lesions in anal samples. These markers may enhance the early detection and prevention strategies for HPV-related cancers in high-risk populations, with follow-up data indicating potential for monitoring lesion progression.