BackgroundThe burden of HIV is high in men who have sex with men (MSM), but the factors associated with increased disease burden are not fully understood. We did a prospective cohort study among MSM in Beijing, China, to explore these issues further. MethodsThe study took place between May 1, 2007, and Dec 31, 2012. Participants were recruited from HIV-infected MSM seeking care at Youan Hospital, Beijing. After discharge, study participants agreed to be trained and were hired to distribute study recruitment flyers at venues frequented by MSM, including clubs, bars, parks, and bathhouses. Participants were also encouraged to refer their peers to enrol into the study. MSM were eligible to participate in the study if they were aged 18 years and older, reported sexual behaviours including vaginal or anal intercourse in the past 6 months, and had received no previous serological test for HIV antibody or an antibody-negative result. After enrolment, HIV-negative MSMs were encouraged to return for study visits, which included a standardised interview about sexual behaviour at 3 months. A service package was provided at each visit, including HIV antibody and syphilis tests, free condoms, an allowance of 50 CNY (US$7·40) for transport, and counselling on use of condoms to prevent HIV transmission. Primary outcomes were HIV infection at initial screening and during the 5-year follow-up, and the effect of condom use against acquisition of HIV infection according to consistency of condom use (50%, 75%, and 100%). Factors associated with increased disease burden were also examined with a Cox proportional hazards model. FindingsAt enrolment, among 5800 MSM we identified 484 (8·3%) prevalent cases of HIV infection and 293 (5·1%) prevalent cases of syphilis. 2045 (64%) of 3178 MSM were aged between 18 and 30 years, 2320 (73%) of 3178 had attained at least high school education, and 2166 (68%) of 3178 had never married. 466 (26%) of 1758 reported being in only steady partnerships, 642 (37%) of 1758 reported both steady and casual partnerships, and 650 (37%) of 1758 reported only casual partnerships. Among 3178 MSM who were HIV negative at enrolment and who had also completed at least one follow-up interview, 387 infections were observed in up to 5467 person-years of follow-up, implying an incidence of 7·1 per 100 person-years (95% CI 6·2–7·6), with median follow-up of 1·7 years (IQR 0·5–2·7) and an average retention rate of 84% per 6 month interval. Most study participants (2317 [84%] of 2766) were migrants, with major reasons for drop out being leaving Beijing, seroconversion, or feeling that testing was unnecessary. Comparing the final visit to the baseline visit, the probability of reporting 100% condom use increased by 47% among those in steady partnerships (from 322 of 969 participants to 624 of 1281 participants) and 42% in MSM in casual partnerships (from 414 of 1090 to 574 of 1068). Consistent condom use within steady partnerships was associated with lower HIV incidence than was inconsistent use: incidence was 11·5 per 100 person-years (95% CI 6·8–16·2), 9·4 per 100 person-years (5·9–12·9), and 8·7 per 100 person-years (6·0–11·3) in those reporting 50%, 75%, and 100% condom use, respectively. InterpretationOverall HIV incidence and baseline levels of risk were high in this sample of Chinese MSM. During the study, preventive efforts increased, and condom promotion was associated with reduced risk. However, reliance on self-reported condom use is an important limitation. Further interventions (eg, sexually transmitted disease treatment and pre-exposure prophylaxis) might be needed to curtail the spread of HIV in this population. FundingThe study was funded by the Chinese Government 12th Five-Year Plan (2012ZX10001-003, 2012ZX10001-006, and 2012ZX10004904-002-002), National Natural Science Foundation (number 81372958), and Beijing Key Laboratory (number BZ0089). The sponsors of the study had no role in study design, data collection, data analysis, data interpretation, or writing of the report.