Background HIV is a major public health issue around the world, especially in developing countries. Although the overall prevalence of HIV in Nepal is relatively low and the country itself is considered low risk, there are specific sub-populations where the prevalence is far higher than the national average. One of these sub-groups is male injection drug users (IDUs). In order to understand the reasons for the differences in prevalence, a series of socio-demographic, behavioural and knowledge-based risk factors need to be assessed. Methods The study used a series of 7 cross-sectional survey datasets, collected between 2003 and 2017 (N=2,235) to investigate trends in HIV prevalence among male IDUs by key socio-demographic and behavioural and knowledge-based risk factors. A series of logistic regression models were conducted to investigate the association between study factors and HIV in the Pokhara valley, Nepal. Results Overall HIV prevalence has decreased from the levels seen in 2003 (22.0%) and 2005 (21.7%), with the lowest prevalence recorded in 2015 (2.6%), however prevalence has increased in the most recent period (4.9%). A lower risk of HIV was associated with younger age (less than or equal to 24 years compared to greater than 24 years, OR = 0.17, 95% CI = 0.10, 0.31), not being married (OR = 0.51, 95% CI = 0.33, 0.80) and shorter duration of drug use (less than or equal to 4 years compared to greater than 4 years, OR = 0.16, 95% CI = 0.09, 0.29). A higher risk of HIV was associated with low (compared to secondary or higher) education level (OR = 2.76, 95% CI = 1.75, 4.36), a lack of addiction treatment (OR = 2.59, 95% CI = 1.64, 4.08), and recent use of unsterilized injection equipment (OR = 2.22, 95% CI = 1.20, 4.11). Conclusion Although knowledge of HIV is high among male IDUs, the prevalence of individuals who possess comprehensive knowledge and the number of individuals who have received treatment for drug addiction has decreased. This may indicate that addiction treatment and HIV education programs need to be strengthened.