BackgroundThe level of depression among drug addicts is generally higher than normal. Hostility and sense of life meaning may influence depression and become risk factors for depression. This study has three research purposes. First, to analyze whether drug use can aggravate hostility and depression levels. Second, to assess whether the hostility has different effects on depression among drug addicts and non-addicts. Third, to examine whether the sense of life meaning has a mediating role between different groups (drug addicts and non-addicts).MethodsThis study was conducted from March to June 2022. 415 drug addicts (233 males and 182 females) and 411 non-addicts (174 males and 237 females) were recruited in Chengdu, Sichuan Province. After signing informed consent, their psychometric data were obtained using the Cook-Medley Hostility Scale (CMI), Beck Depression Inventory (BDI) and Meaning in Life Questionnaire (MLQ) questionnaires. Linear regression models were used to assess the impact of hostility and depression among drug addicts and non-addicts. Bootstrap mediation effect tests were used to further test the mediation effect of sense of life meaning between hostility and depression.ResultsThe results showed four main outcomes. First, compared with non-addicts, drug addicts had higher levels of depression. Second, hostility exacerbated depression in both drug addicts and non-addicts. Compared with non-addicts, hostile affect had a greater effect on depression in drug addicts. Third, the sense of life meaning among females was higher than males. Fourth, for drug addicts, the sense of life meaning showed a mediating effect between social aversion and depression, while for non-addicts, the sense of life meaning showed a mediating effect between cynicism and depression.ConclusionsDepression is more severe in drug addicts. More attention should be paid to the mental health of drug addicts, because the elimination of negative emotions is conducive to reintegration into society. Our results provide a theoretical basis for reducing depression among drug addicts and non-addicts. As a protective factor, we can reduce their hostility and depression by improving the sense of life meaning.