Summary: To identify addiction genes, we evaluate intravenous self-administration of cocaine or saline in 84 inbred and recombinant inbred mouse strains over 10 days. We integrate the behavior data with brain RNA-seq data from 41 strains. The self-administration of cocaine and that of saline are genetically distinct. We maximize power to map loci for cocaine intake by using a linear mixed model to account for this longitudinal phenotype while correcting for population structure. A total of 15 unique significant loci are identified in the genome-wide association study. A transcriptome-wide association study highlights the Trpv2 ion channel as a key locus for cocaine self-administration as well as identifying 17 additional genes, including Arhgef26, Slc18b1, and Slco5a1. We find numerous instances where alternate splice site selection or RNA editing altered transcript abundance. Our work emphasizes the importance of Trpv2, an ionotropic cannabinoid receptor, for the response to cocaine.