Over the past two decades, public health research has emphasized the role of individual risk behaviors, primarily injection and sexual risk behaviors, in the spread of HIV infection. Much less emphasis has been given to understanding the determinants of these risk behaviors. Although individual characteristics are partly responsible for risky injection and sexual behaviors, they do not explain all the interpersonal variability in risk behavior. Contextual factors associated with HIV risk behavior may include structural factors (e.g., availability of services), social norms and attitudes (e.g., social trust), disadvantage (e.g., neighborhood socioeconomic status), and features of the physical environment (e.g., housing quality). This article presents a conceptual framework that incorporates some of the key contextual domains that may affect drug use behavior. It also presents data from a study of street-recruited drug users as an example of the relations between social contextual factors and frequency of injecting drug use, and discusses some methodological challenges in the study of contextual determinants of drug use behavior.