Abstract: Dihydropyrimidine dehydrogenase is one of the main pharmacological metabolizers of fluoropyrimidines, a group of drugs widely used in clinical oncology. Around 20 to 30% of patients treated with fluoropyrimidines experience severe toxicity caused by a partial or total decrease in enzymatic activity. This decrease is due to molecular variants in the DPYD gene. Their prevalence and allelic frequencies vary considerably worldwide, so their description in heterogeneous groups such as the Ecuadorian population will allow for the description of pharmacogenetic variants and proper characterization of this population. Thus, we genotyped all the molecular variants with a predictive value for DPYD in a total of 410 Ecuadorian individuals belonging to Mestizo, Afro-Ecuadorian, and Indigenous ethnic groups. Moreover, we developed a genetic ancestry analysis using 46 autosomal ancestry informative markers. We determined 20 genetic variations in 5 amplified regions, including 3 novel single nucleotide variants. The allele frequencies for DPYD variants c.1627G>A (*5, rs1801159), c.1129-15T>C (rs56293913), c.1218G>A (rs61622928), rs1337752, rs141050810, rs2786783, rs2811178, and g.97450142G>A (chr1, GRCh38.p13) are significantly related to Native American and African ancestry proportions. In addition, the FST calculated from these variants demonstrates the closeness between Indigenous and Mestizo populations, and evidences genetic divergence between Afro-Ecuadorian groups when compared with Mestizo and Indigenous ethnic groups. In conclusion, the genetic variability in the DPYD gene is related to the genetic component of ancestral populations in different Ecuadorian ethnic groups. The absence and low frequency of variants with predictive value for fluoropyrimidine toxicity such as DPYD *2A, HapB3, and c.2846A>T (prevalent in populations with European ancestry) is consistent with the genetic background found.