The aim of this study was to examine the risk of early discontinuation of metformin as a proxy for intolerance, associated with use of drugs known to inhibit transporters involved in metformin distribution. We analysed all incident users of metformin in Denmark between 2000 and 2012 (n = 132,221) and in a cohort of US patients (n = 296,903). Risk of early discontinuation of metformin was assessed using adjusted logistic regression for 28 drugs putatively inhibiting metformin transporters and four negative controls. Increased odds ratio of early discontinuation of metformin was only associated with codeine, an inhibitor of organic cation transporter 1 in both cohorts [adjusted odds ratio (OR) in Danish cohort (95% CI): 1.13 (1.02–1.26), adjusted OR in American cohort (95% CI): 1.32 (1.19–1.47)]. The remaining drugs were not associated with increased odds ratio of early discontinuation and, surprisingly, four drugs were associated with a decreased risk. These findings indicate that codeine use may be associated with risk of early discontinuation of metformin and could be used as a basis for further investigation.