Background: Previous studies on the effects of Statins in preventing atrial fibrillation (AF) after cardiac surgery have shown conflicting results. Whether statins prevent AF in patients treated with postoperative beta blockers and whether the statin-effect is dose related are unknown. Methods: We retrospectively studied 1936 consecutive patients who underwent coronary artery bypass graft (CABG) (n = 1493) or valve surgery (n = 443) at the Minneapolis Veterans Affairs Medical Center. All patients were in sinus rhythm before the surgery. Postoperative beta blockers were administered routinely (92% within 24 hours postoperatively). Results: Mean age was 66+10 years and 68% of the patients were taking Statins. Postoperative AF occurred in 588 (30%) patients and led to longer length of stay in the intensive care unit versus those without AF (5.1+7.6 days versus 2.5+2.3 days, p < 0.0001). Patients with a past history of AF had a 5 times higher risk of postoperative AF (odds ratio 5.1; 95% confidence interval 3.4 to 7.7; p < 0.0001). AF occurred in 31% of patients taking statins versus 29% of the others (p = 0.49). In multivariable analysis, statins were not associated with AF (odds ratio (OR) 0.93, 95% confidence interval (CI) 0.7 to 1.2; p = 0.59). However, in a subgroup analysis, the patients treated with Simvastatin >20 mg daily had a 36% reduction in the risk of postoperative AF (OR 0.64, 95% CI 0.43 to 0.6; p = 0.03) in comparison to those taking lower dosages. Conclusion: Among cardiac surgery patients treated with postoperative beta blockers Statin treatment reduces the incidence of postoperative AF when used at higher dosages.