Introduction and Aims: An understanding of the relationship between hepatitis C viral (HCV) infection and contextual factors such as imprisonment may contribute to the development of targeted treatment and prevention programs. We examine the associations of imprisonment and drug dependence with lifetime exposure to HCV, and whether these associations differ for Aboriginal and Torres Strait Islander and non-Indigenous people who inject drugs. Design and Methods: Respondent-driven sampling was used in major cities and ‘peer recruitment’ in regional towns of Queensland to obtain a community sample of people who injected drugs, which comprised 243 Indigenous and 227 non-Indigenous participants who had ever been tested for HCV. Data are cross-sectional. Two binary Poisson models were developed to examine associations for variables relating to imprisonment, Indigeneity and drug use history. Results: Sharing needles and syringes in prison (adjusted risk ratio 1.25, 95% confidence interval 1.02–1.53) remained significantly associated with HCV infection after adjustment for Indigeneity, injecting drug use history and drug dependence. Opioid dependence and concurrent dependence on opioids and methamphetamine was also independently associated with HCV infection. Discussion and Conclusions: Sharing needles and syringes in prison is linked with HCV infection, for both Aboriginal and Torres Strait Islander and non-Indigenous people who inject drugs. Further development of treatment and prevention programs in prisons is required, with consideration of the role of opioid and methamphetamine dependence in HCV exposure.