Men who have sex with men (MSM) account for more than half of new HIV infections each year. Previous research has linked cognitive variables from the Information, Motivational and Behavioral Skills (IMB) Model to sexual risk behavior, but cognitions may additionally influence risk appraisals of sexual encounters and subsequently potentiate sexual risk. The aim of this study was to use prospective event-level data to examine the direct influence of cognitive variables on sexual risk in MSM, as well as the moderating effects of these variables on the association between unprotected anal intercourse (UAI) and risk appraisals of these encounters. One hundred forty-three ethnically diverse MSM were enrolled in a 3-month online diary study of sexual behavior. Each week participants reported on specific sexual behaviors that occurred during each of up to three sexual encounters, including type of sexual behavior, condom use, and perceived risk for acquiring HIV during the encounter. All analyses were conducted with Hierarchical Linear Modeling. Condom use self-efficacy was the only cognitive variable that was directly associated with UAI. However, both HIV knowledge and social norms of condom use contributed to accuracy of risk appraisals. Conversely, MSM who were highly motivated to become/stay safer downplayed the risk associated with their unprotected sexual encounters. Cognitive variables play an important role in influencing sexual risk in MSM both directly and indirectly via risk appraisals. Addressing these cognitive processes in HIV prevention interventions may help to increase the likelihood of condom use and the accuracy of risk appraisals.