This study aimed to evaluate whether functional variants in the ankyrin repeat and kinase domain-containing 1 (ANKK1) gene and/or the dopamine receptor D2 (DRD2) gene modulate the subjective effects (reward or non-reward response to a stimulus) produced by cocaine administration. Cocaine-dependent participants (N = 47) were administered 40 mg of cocaine or placebo at time 0, and a subjective effects questionnaire (visual analog scale) was administered 15 min prior to cocaine administration, and at 5, 10, 15 and 20 min following administration. The influence of polymorphisms in the ANKK1 and DRD2 genes on subjective experience of cocaine in the laboratory was tested. Participants with a T allele of ANKK1 rs1800497 experienced greater subjective ‘high’ (P = 0.00006), ‘any drug effect’ (P = 0.0003) and ‘like’ (P = 0.0004) relative to the CC genotype group. Although the variant in the DRD2 gene was shown to be associated with subjective effects, linkage disequilibrium analysis revealed that this association was driven by the ANKK1 rs1800497 variant. A participant's ANKK1 genotype may identify individuals who are likely to experience greater positive subjective effects following cocaine exposure, including greater ‘high’ and ‘like’, and these individuals may have increased vulnerability to continue using cocaine or they may be at greater risk to relapse during periods of abstinence. However, these results are preliminary and replication is necessary to confirm these findings.