In this study, we examine the interaction between drug addiction and the contagion of HIV/AIDS in Iranian prisons. We provide a simple mathematical model for such an interaction. The stability of drug addiction and HIV/AIDS models are analyzed separately with no medical treatment. Then, we present an improved model describing the effect of treatment of drug users on the spread of HIV/AIDS. This fully extended model is obtained by adding some new parameters for the treatment of drug addiction. The impact of rehabilitating treatments on the control of HIV/AIDS spread in prisons is investigated, and finally, the reproduction numbers are compared in cases where there is no cure or some treatment methods are available.