In this cohort study with a target trial emulation design including 14 223 patients with prostate cancer, SGLT2 inhibitor use was associated with considerably lower risks of androgen deprivation therapy failure and lower risk of next-generation hormonal agent failure. Here, SLC5A2 is linked to prostate cancer.