Personalized cognitive counseling (PCC) is an evidence-based intervention designed to modify HIV-related risk behavior. We assessed the impact of PCC on sexual behavior, drinking expectancy, and incidence of sexually transmitted infections (STIs) in a 6-month randomized controlled trial among 153 HIV-uninfected men who have sex with men (MSM) and transgender women (TW) in Peru. Study retention was ≥ 90%, with three HIV infections (3 Control) and 19 cases of GC/CT (10 Control, 9 PCC) at 6 months. There was a decline in condomless receptive anal intercourse in the Control (0.74, 95% CI 0.60–0.91; p < 0.01) and PCC arms (0.72, 0.55–0.94; p = 0.02) at 6-month follow-up. There was a decrease in drinking expectancy at 6 months among participants endorsing alcohol use in the PCC arm (0.89, 0.83–0.96; p < 0.01), versus no change in the Control arm (0.98, 0.92–1.04; p = 0.54). PCC was efficacious in reducing drinking expectancy and HIV risk among MSM and TW in Peru.