Heroin dependence is a severe psychiatric issue that often coexists with mood disorders and personality disorders, which further compound the complexity and severity of the dependence. The utilization of genetic factors in predicting psychiatric disorders has made notable advancements. We enrolled female patients diagnosed with heroin dependence (n = 263) and assessed individuals with paranoid personality disorder, depressive personality disorder, antisocial personality disorder, and schizoid personality disorder based on the DSM-IV criteria. Our objective was to examine the single nucleotide polymorphisms (SNPs; rs174696, rs174699, rs4680, rs4818, rs737866, rs933271, rs12953076b, and rs44458044b) and their association with personality. We discovered a significant association of antisocial personality disorder with rs1544325, rs4680, and rs4818 (P < 0.05). Additionally, hallucinogen use was associated with rs3792738 (P < 0.05), rs10062367 (P < 0.05), and rs1875999 (P < 0.01). However, we did not observe a relationship between the SNPs and schizoid personality disorder, paranoid personality disorder, or depressive personality disorder. Heroin dependence is linked to specific personality disorders, particularly antisocial personality disorder. The influence of genetic factors could have a significant impact on the emergence of personality alterations linked to the consumption of heroin.