HIV risks involving injection and sex behaviors were analyzed in relation to cocaine use and gender among 487 opiate-dependent clients in methadone treatment. Those who also used cocaine were at greater risk than non-cocaine users on HIV risky injection variables. Females were at more risk than males on the HIV risky sex behaviors involving unprotected sex in exchange for money or drugs and with injection users. There were interactions between cocaine use and gender, however, in relation to frequency of injecting with dirty works and sharing dirty works with strangers, as well as having unprotected sex for money or drugs, with injection users, and while intoxicated. HIV risks increased as a direct function of cocaine usage level among males, but not among females; instead, low-to-intermediate levels of cocaine use by females was associated with high-risk behaviors. Implications for HIV risk reduction interventions in drug treatment programs are discussed.