Previous studies indicate that topiramate reduces alcohol use among problem drinkers, with one study showing that the effect was moderated by a polymorphism (rs2832407) in GRIK1, the gene encoding the GluK1 kainate subunit. We examined whether the interactive effect of medication and genotype (1) altered the association between daily self-efficacy and later-day drinking; and (2) had an indirect effect on drinking via self-efficacy. In a 12-week, placebo-controlled trial of topiramate, we used daily interactive voice response technology to measure self-efficacy (i.e. confidence in avoiding heavy drinking later in the day) and drinking behavior in 122 European-American heavy drinkers. Topiramate's effects on both self-efficacy and drinking level were moderated by rs2832407. C-allele homozygotes treated with topiramate showed higher levels of self-efficacy and lower levels of nighttime drinking across the 12-week trial. Further, the interactive effect of topiramate and genotype on mean nighttime drinking levels was mediated by mean levels of self-efficacy. By modeling topiramate's effects on nighttime drinking across multiple levels of analysis, we found that self-efficacy, a key psychologic construct, mediated the effect of topiramate, which was moderated by rs2832407 genotype. Thus, it may be possible to use an individualized assessment (i.e. genotype) to select treatment to optimize the reduction in heavy drinking and thereby provide a personalized treatment approach.