We investigated the hypothesis that gay and bisexual men experiencing stressful life events are more likely to engage in risky sexual behavior. Data were from a cohort study of 155 HIV-positive and 207 HIV-negative men in Ontario, Canada (1998-2007). We quantified the relation between stressful life events and unprotected anal intercourse with a non-regular partner. In the past 6 months, 19% reported unprotected intercourse (HIV+: 28%; HIV-: 13%) and 58% reported one or more stressful life events (HIV+: 64%; HIV-: 55%). Among HIV-negative men, the odds of unprotected intercourse increased by 1.15 for each additional event (95%CI 1.06, 1.24). Among HIV-positive men, those who reported the event "problems due to alcohol or drugs" were 1.80 (95%CI 1.27, 2.56) times more likely to report unprotected intercourse. Interventions to assist men to cope with stress may help to prevent population spread of HIV and improve overall health.