The aim of this study was to evaluate in-hospital outcomes and long-term survival of patients undergoing cardiac surgery with preoperative atrial fibrillation (AF). We compared different strategies, including no-AF treatment, left atrial appendage occlusion (LAAO) alone, concomitant surgical ablation (SA) alone or both. A retrospective analysis using the KROK registry included all patients with preoperative diagnosis of AF who underwent cardiac surgery in Poland between between January 2012 and December 2022. Risk adjustment was performed using regression analysis with inverse probability weighting of propensity scores. We assessed 6-year survival with Cox proportional hazards models. Sensitivity analysis was performed based on index cardiac procedure. Initially, 42510 patients with preoperative AF were identified, and, after exclusion, 33949 included in the final analysis. A total of 1107 (3.26%) received both SA and LAAO, 1484 (4.37%) received LAAO alone, 3921 (11.55%) SA alone and the remaining 27437 (80.82%) had no AF-directed treatment. As compared to no treatment, all strategies were associated with survival benefit over 6-year follow-up. A gradient of treatment was observed with the highest benefit associated with SA + LAAO followed by SA alone and LAAO alone (log-rank P < 0.001). Mortality benefits were reflected when stratified by surgery type with the exception of aortic valve surgery where LAAO alone fare worse than no treatment. Among patients with preoperative AF undergoing cardiac surgery, surgical management of AF, particularly SA + LAAO, was associated with lower 6-year mortality. These findings support the benefits of incorporating SA and LAAO in the management of AF during cardiac surgery.