Based on the network pharmacology, our study predicted the potential therapeutic targets of SGLT2 inhibitors in DM with HF and revealed their action on the main pathways through core genes, which explained the mechanisms of SGLT2 inhibitors in DM with HF and provided scientific evidence for SGLT2 inhibitors to treat DM with HF. This evidence concerns the gene SLC5A2 and diabetes mellitus.