Background We report the prevalence and predictors for high-grade anal intraepithelial neoplasia (HGAIN) in community-based cohorts of HIV-negative and HIV-positive homosexual men in Sydney, Australia. Methods: A cross-sectional study of consecutive participants in both cohorts was performed in 2005 (204 HIV-negative and 128 HIV-positive men). Anal swabs collected by a research nurse underwent cytological analysis, using the ThinPrep procedure, and human papillomavirus (HPV) testing. Participants who had cytological abnormalities other than low-grade squamous epithelial lesions (SIL) were referred for high resolution anoscopy (HRA). Results: A total of 114 men had cytological abnormalities (24.3% of HIV-negative and 57.5% of HIV-positive men, odds ratio (OR) = 4.21, 95% confidence interval (CI) 2.57–6.90). However, only three (2.3%) HIV-positive men and no HIV-negative men had high-grade SIL on anal cytology. Seventy-seven men were referred for HRA, of whom 63 (81.8%) attended. Histologically confirmed HGAIN was detected in 21 (33.3%). The prevalence of HGAIN was higher in HIV-positive men (10.8%) than in HIV-negative men (5.0%, OR = 2.29, 95% CI 0.93–5.63, P = 0.071). HGAIN was not related to age but was strongly associated with the detection of high-risk types of anal HPV (OR = 10.1, 95% CI 1.33–76.2) rather than low-risk types (OR = 1.97, 95% CI 0.74–5.25). Conclusion: HGAIN was prevalent in homosexual men across all age groups and was more than twice as common in HIV-positive men compared with HIV-negative men. The presence of high-risk anal HPV was highly predictive of HGAIN.