Abstract Background Most cardiac operations are performed under cardiopulmonary bypass(CPB); however, it is well known that cardiopulmonary bypass often causes systemic inflammatory response syndrome (SIRS). Cardiac tissue inflammation induced by the CPB and surgical trauma has been previously hypothesized to cause POAF. The relationship between inflammation and atrial fibrillation after cardiac surgery is further strengthened by studies that showed that corticosteroid (CS) prophylaxis can reduce the occurrence of atrial fibrillation after cardiac surgery. Aim of the Work to determine the efficacy of corticosteroids in prophylaxis of POAF and shorten length of intensive care unit (ICU) and hospital stay. Patients and Methods This is randomized controlled clinical trial on 84 patients who underwent their first elective cardiac surgery under cardiopulmonary bypass in Ain Shams University Hospitals. Patients were randomized into two equal groups (n = 42 each) as the control group who underwent a standard cardiopulmonary bypass without any additional medication which was performed under the supervision of a specialized elite and experts in their specialization, and the Methylprednisolone (MP) group who was given 1 g of methylprednisolone (divided into 250 mg every 6h once in the ICU), The primary outcome is the overall occurrence of postoperative AF during the first 72 hours after cardiac surgery. Secondary outcomes are the length of hospital stay, and intensive care unit (ICU) stay. Results This study revealed that using corticosteroids effective in reducing the incidence of POAF without increasing the incidence of postoperative complications and adverse effects due to corticosteroids therapy. This study showed decreased risk of developing AF in patients undergoing cardiac surgery. The incidence of POAF was found be significant lower in MP group 16.7% (7 patients developed AF) versus 35.7% in the control group (15 patients developed AF) (p 0.047). Conclusion Use of Corticosteroids is effective in prophylaxis of POAF in patients undergoing elective cardiac surgery in terms of reducing its incidence and decreasing the length of ICU and hospital stay.