The objectives of this study were to identify risk factors associated with acute and early HIV infection (AEH) among men who have sex with men (MSM) undergoing community HIV testing and to compare demographics in those diagnosed with AEH with those diagnosed at chronic stage of HIV infection.In this retrospective cohort study, we analyzed risk factors associated with AEH among 8925 unique MSM (including 200 with AEH [2.2%] and 219 [2.5%] with newly diagnosed chronic HIV infection) undergoing community-based, confidential AEH screening in San Diego, California.The combination of condomless receptive anal intercourse (CRAI) plus ≥5 male partners, CRAI with an HIV-positive male, CRAI with a person who injects drugs, and prior syphilis diagnosis were significant predictors of AEH in the multivariable Cox regression model. Individuals reporting ≥1 of these 4 risk factors had a hazard ratio of 4.6 for AEH. MSM diagnosed with AEH differed in race (P = 0.005; more reported white race [P = 0.001], less black race [P = 0.030], trend toward less Native American race [P = 0.061]), when compared to those diagnosed with chronic HIV infection, while there was no difference observed regarding age.We established a multivariate model for the predicting risk of AEH infection in a cohort of MSM undergoing community HIV screening, which could be potentially used to discern those in need of further HIV nucleic acid amplification testing for community screening programs that do not test routinely for AEH. In addition, we found that race differed between those diagnosed with AEH and those diagnosed at chronic stage of HIV infection underlining the need for interventions that reduce stigma and promote the uptake of HIV testing for black MSM.