Sulfonylureas, a commonly used class of medication used to treat type 2 diabetes, have been associated with an increased risk of cardiovascular disease. Their effects on QT interval duration and related electrocardiographic phenotypes are potential mechanisms for this adverse effect. In 11 ethnically diverse cohorts that included 71 857 European, African-American and Hispanic/Latino ancestry individuals with repeated measures of medication use and electrocardiogram (ECG) measurements, we conducted a pharmacogenomic genome-wide association study of sulfonylurea use and three ECG phenotypes: QT, JT and QRS intervals. In ancestry-specific meta-analyses, eight novel pharmacogenomic loci met the threshold for genome-wide significance (P<5 × 10-8), and a pharmacokinetic variant in CYP2C9 (rs1057910) that has been associated with sulfonylurea-related treatment effects and other adverse drug reactions in previous studies was replicated. Additional research is needed to replicate the novel findings and to understand their biological basis.