This study is aimed at evaluating the effect of empagliflozin in preventing atrial fibrillation after coronary artery bypass grafting (CABG). Eighty-two patients who fulfilled the inclusion criteria were allocated to the empagliflozin group (n = 43) or placebo group (n = 39). In two groups, patients received empagliflozin or placebo tablets 3days before surgery and on the first three postoperative days (for 6days) in addition to the standard regimen during hospitalization. During the first 3days after surgery, types of arrhythmias after cardiac surgery, including supraventricular arrhythmias, especially postoperative atrial fibrillation (POAF), ventricular arrhythmias, and heart blocks, were assessed by electrocardiogram monitoring. C-reactive protein (CRP) levels were evaluated pre-operatively and postoperative on the third day. The incidence of POAF in the treatment group was lower compared to the control group; however, this reduction was statistically non-significant (p = 0.09). The frequency of ventricular tachycardia was reduced significantly in the treatment group versus patients in the control (p = 0.02). Also, a significant reduction in the frequency of premature ventricular contractions (PVCs) was seen in the treatment group in comparison with the control group (p = 0.001). After the intervention, CRP levels were significantly less in the empagliflozin group compared to the control group in the third postoperative day (p = 0.04). The prophylactic use of empagliflozin effectively reduced the incidence of ventricular arrhythmia in patients undergoing CABG surgery.