The use of sodium-glucose co-transporter 2 inhibitors to treat heart failure with preserved ejection fraction (HFpEF) is under investigation in ongoing clinical trials, but the exact mechanism of action is unclear. Here we aimed to use artificial intelligence (AI) to characterize the mechanism of action of empagliflozin in HFpEF at the molecular level. We retrieved information regarding HFpEF pathophysiological motifs and differentially expressed genes/proteins, together with empagliflozin target information and bioflags, from specialized publicly available databases. Artificial neural networks and deep learning AI were used to model the molecular effects of empagliflozin in HFpEF. The model predicted that empagliflozin could reverse 59% of the protein alterations found in HFpEF. The effects of empagliflozin in HFpEF appeared to be predominantly mediated by inhibition of NHE1 (Na+/H+ exchanger 1), with SGLT2 playing a less prominent role. The elucidated molecular mechanism of action had an accuracy of 94%. Empagliflozin’s pharmacological action mainly affected cardiomyocyte oxidative stress modulation, and greatly influenced cardiomyocyte stiffness, myocardial extracellular matrix remodelling, heart concentric hypertrophy, and systemic inflammation. Validation of these in silico data was performed in vivo in patients with HFpEF by measuring the declining plasma concentrations of NOS2, the NLPR3 inflammasome, and TGF-β1 during 12 months of empagliflozin treatment. Using AI modelling, we identified that the main effect of empagliflozin in HFpEF treatment is exerted via NHE1 and is focused on cardiomyocyte oxidative stress modulation. These results support the potential use of empagliflozin in HFpEF.