Understanding the role of inheritance in individual variation in drug response is the focus of pharmacogenetics (PGx). A key part of this understanding is quantifying the role of genetic ancestry in this phenotypic outcome. To provide insight into the relationship between ethnicity and drug response, this study first infers the global distribution of PGx variation and defines its structure. Second, the study evaluates if geographic population structure stems from all PGx loci in general, or if structure is caused by specific genes. Lastly, we identify the genetic variants contributing the greatest proportion of such structure. Our study describes the global genetic structure of PGx loci across the 52 populations of the Human Genome Diversity Cell-Line Panel, the most inclusive set of human populations freely available for studies on human genetic variation. By analysing genetic variation at 1,001 single nucleotide polymorphisms (SNPs) involved in biotransformation of exogenous substances, we describe the between-populations PGx variation, as well geographical groupings of diversity. In addition, with discriminant analysis of principal component (DAPC), we infer how many and which groups of populations are supported by PGx variation, and identify which SNPs actually contribute to the PGx structure between such groups. Our results show that intergenic, synonymous and non-synonymous SNPs show similar levels of genetic variation across the globe. Conversely, loci coding for Cytochrome P450s (mainly metabolizing exogenous substances) show significantly higher levels of genetic diversity between populations than the other gene categories. Overall, genetic variation at PGx loci correlates with geographic distances between populations, and the apportionment of genetic variation is similar to that observed for the rest of the genome. In other words, the pattern of PGx variation has been mainly shaped by the demographic history of our species, as in the case of most of our genes. The population structure defined by PGx loci supports the presence of six genetic clusters reflecting geographic location of samples. In particular, the results of the DAPC analyses show that 27 SNPs substantially contribute to the first three discriminant functions. Among these SNPs, some, such as the intronic rs1403527 of NR1I2 and the non-synonymous rs699 of AGT, are known to be associated with specific drug responses. Their substantial variation between different groups of populations may have important implications for PGx practical applications.