Despite increasing therapeutic options to treat rheumatoid arthritis (RA), many patients fail to reach treatment targets. The use of antidiabetic drugs like thiazolidinediones has been associated with lower RA risk. We aimed to explore the repurposing potential of antidiabetic drugs in RA prevention by assessing associations between genetic variation in antidiabetic drug target genes and RA using Mendelian randomization (MR). A two-sample MR design was used to estimate the association between the antidiabetic drug and RA risk using summary statistics from genome-wide association studies (GWAS). We selected independent genetic variants from the gene(s) that encode the target protein(s) of the investigated antidiabetic drug as instruments. We extracted the associations of instruments with blood glucose concentration and RA from the UK Biobank and a GWAS meta-analysis of clinically diagnosed RA, respectively. The effect of genetic variation in the drug target(s) on RA risk was estimated by the Wald ratio test or inverse-variance weighted method. Insulin and its analogues, thiazolidinediones, and sulfonylureas had valid genetic instruments (n = 1, 1, and 2, respectively). Genetic variation in thiazolidinedione target (gene:PPARG) was inversely associated with RA risk (odds ratio [OR] 0.38 per 0.1mmol/L glucose lowering, 95% confidence interval [CI] 0.20–0.73). Corresponding ORs (95%CIs) were 0.83 (0.44–1.55) for genetic variation in the targets of insulin and its analogues (gene:INSR), and 1.12 (0.83, 1.49) 1.25 (0.78-2.00) for genetic variation in the sulfonylurea targets (gene:ABCC8andKCNJ11). In conclusion, genetic variation in the thiazolidinedione target is associated with a lower RA risk. The underlying mechanisms warrant further exploration.Supplementary InformationThe online version contains supplementary material available at 10.1007/s10654-023-01000-9.