Background: Substance abuse and consequently the use of methadone in Iran are reported at high levels. Drugs alter sexual function by affecting the organs of the body. The aim of this study was to evaluate sexual functioning and serum testosterone levels in opiate addicts, individuals receiving methadone maintenance treatment (MMT), and healthy men living in the city of Rafsanjan, Iran, in 2016.Methods: The statistical population of this descriptive study included: A) opium-smoking men, B) individuals undergoing MMT, and C) those without any history of substance abuse. Using a formula, the sample size consisted of 70 individuals who were randomly selected from the statistical population. The study samples also completed the International Index of Erectile Function (IIEF). Moreover, the serum testosterone levels were measured using the laboratory-based Enzyme Linked Immunosorbent Assay (ELISA) diagnostic kits. The data were analyzed by SPSS software using Mann-Whitney U and Kruskal-Wallis tests with a significant level of < 0.050.Findings: The serum testosterone levels in healthy individuals were higher than those in other two groups (P = 0.001). In addition, the sexual functioning indicators of men receiving MMT and opiate-smoking ones (P = 0.001) were lower than those of healthy individuals except for overall sexual satisfaction (P = 0.069).Conclusion: Methadone and opium reduce different aspects of sexual functioning. It seems that this change was through having impacts on serum testosterone levels; however, psychological, social, and economic dimensions are suggested to be considered in this domain.