We present a genome-wide association study of metabolic traits in human urine, designed to investigate the detoxification capacity of the human body. Using NMR spectroscopy, we tested for associations between 59 metabolites in urine from 862 male participants in the population-based SHIP study. We replicated the results using 1,039 additional samples of the same study, including a 5-year follow-up, and 992 samples from the independent KORA study. We report five loci with joint P values of association from 3.2 × 10(-19) to 2.1 × 10(-182). Variants at three of these loci have previously been linked with important clinical outcomes: SLC7A9 is a risk locus for chronic kidney disease, NAT2 for coronary artery disease and genotype-dependent response to drug toxicity, and SLC6A20 for iminoglycinuria. Moreover, we identify rs37369 in AGXT2 as the genetic basis of hyper-β-aminoisobutyric aciduria.