Researchers have identified the association between the use of cocaine and sexual behavior as an important risk factor for HIV infection and have attempted to elucidate the nature of this association. Several lines of research have suggested that facilitation of sexual behavior during intoxication with cocaine may be because of the direct pharmacological effects of the drug (e.g., increase in sexual desire), whereas others have pointed to the importance of factors related to the context of drug use (e.g., opportunities for sexual behavior, expectations about the effects of the drug, social norms). The present study explored the perceived effects of cocaine and heroin on sexual behavior, as well as the social context of drug use as a function of drug type (cocaine vs. heroin), among 46 inner-city drug users who reported a history of regular use of both crack cocaine and heroin. Results indicated that compared to heroin, cocaine had deleterious effects on participants' perceived sexual desire and performance. Despite such deleterious effects on sexual behavior, cocaine was more frequently used with an intimate partner than heroin. Furthermore, participants did not differ in the extent to which they used the two drugs in other social contexts (e.g., with friends, family, or neighbors). These preliminary results suggest that the relationship between cocaine and sexual behavior, especially among long-term cocaine users, may be facilitated by opportunities for sex that exist in the context of cocaine use, rather than by the pharmacological effects of the drug.