Hepatitis C virus (HCV) has become a global public health problem. Many studies have been conducted to identify risk factors for HCV infection. However, some of these studies reported inconsistent results. Using data collected from 11 methadone clinics, we fit both a non-spatial logistical regression and a geographically weighted logistic regression to analyse the association between HCV infection and some factors at the individual level. This study enrolled 5401 patients with 30·0% HCV infection prevalence. The non-spatial logistical regression found that injection history, drug rehabilitation history and senior high-school education or above were related to HCV infection; and being married was negatively associated with HCV infection. Using the spatial model, we found that Yi ethnicity was negatively related to HCV infection in 62·0% of townships, and being married was negatively associated with HCV infection in 81·0% of townships. Senior high-school education or above was positively associated with HCV infection in 55·2% of townships of the Yi Autonomous Prefecture. The spatial model offers better understanding of the geographical variations of the risk factors associated with HCV infection. The geographical variations may be useful for customizing intervention strategies for local regions for more efficient allocation of limited resources to control transmission of HCV.