PURPOSE: Physical exercise offers profound pleiotropic health benefits, particularly for brain function. However, the impact of such exercises on the executive functions of heroin addicts and their negative thinking/affect remains underexplored. We investigated whether physical exercise improves executive function and negative thinking/affect in male heroin addicts.METHODS: We used a pre- and post-test experimental research design involving one control group and two experimental groups. Ninety male heroin addicts with no exercise restrictions were recruited. The participants were randomly divided into three groups (resistance exercise group (n=30), aerobic exercise group (n=30), and no-exercise control group (n=30)). Executive function was measured using the Flanker Inhibitory Control and Attention, 2-Back Working Memory, and Switch Cognitive Flexibility Tests. All experiments were conducted in a quiet room. The Symptom Checklist-90 Revised (SCL-90-R) questionnaire was used to assess psychological status. All variables were measured and evaluated before and after the intervention.RESULTS: Participants exhibited a statistically significant decrease in response times following resistance exercise compared with preresistance exercise, as observed in both the flanker inhibitory control and attention tests, as well as the 2-back working memory test. Participants in the aerobic exercise group demonstrated significant reductions in reaction times on the 2-back working memory and switch cognitive flexibility tests, whereas performance accuracy significantly improved across all executive function tests. Additionally, the scores on the 10 subscales of the SCL-90-R showed a statistically significant decrease in the post-exercise period compared with the pre-exercise period.CONCLUSIONS: Physical exercise is a good non-pharmaceutical intervention for improving executive function and mental health in male heroin addicts.