People who inject drugs are disproportionately affected by HIV and hepatitis C virus (HCV) infections, while there is little global data on HIV and HCV testing and treatment coverage of this population. We conducted a systematic review to evaluate country-level, regional, and global coverage of HIV and HCV testing and treatment among people who inject drugs. We did a systematic review, and searched bibliographic databases (MEDLINE, Embase, and PsycINFO) and grey literature for studies published between Jan 1, 2017, and April 30, 2022, that evaluated the proportion of people who inject drugs who received testing or treatment for HIV or HCV. For each country, we estimated the proportion of people who inject drugs tested for HIV antibodies in the past 12 months (recent), people who inject drugs ever tested for HCV antibodies and HCV RNA, people who inject drugs with HIV currently receiving antiretroviral therapy, and people who inject drugs with HCV ever receiving HCV antiviral treatment. Regional and global estimates, weighted by the population size of people who inject drugs, were generated where sufficient data were available. This study is registered with PROSPERO (CRD42020173974). 512 documents reported data eligible for analyses, including 337 peer-reviewed articles, 27 conference abstracts or presentations, and 148 documents from grey literature or supplementary searches. Data of recent HIV antibody testing were available for 67 countries and ever having had HCV antibody testing were available for 49 countries. Globally, an estimated 48·8% of people who inject drugs were recently tested for HIV antibodies (95% uncertainty interval [UI] 43·3-54·2%; range 0·9-86·0%), and 47·1% had ever been tested for HCV antibodies (95% UI 43·4-51·0%; range 0·0-93·3%). HCV RNA testing data were available from three countries. Coverage of HIV antibody testing was high (>75%) in four countries and for HCV antibody testing in 15 countries. The estimated uptake of current HIV treatment (18 countries) ranged from 2·6% to 81·9%, and the estimated uptake of ever having HCV treatment (23 countries) ranged from 1·8% to 88·6% across countries. Uptake of HIV treatment was high in two countries, and of HCV treatment in one country. HIV and HCV testing and treatment uptake among people who inject drugs was highly variable, and suboptimal in most countries. Strategies to improve access to HIV and HCV care among people who inject drugs and the availability of public health surveillance are urgently required. Australian National Health and Medical Research Council and UK National Institute for Health and Care Research Health Protection Research Unit in Behavioural Science and Evaluation.