Abstract Background New-onset postoperative atrial fibrillation (nPOAF) is a common complication after cardiac surgery (30–50%), being associated with unfavorable long-term outcomes. Using the Society of Thoracic Surgeons National Adult Cardiac Database, we used machine learning (ML) to predict nPOAF and related 30-day outcomes following mitral valve (MV) surgery. A total of 27,856 MV operations were performed at 910 centers between 7/1/2017 and 6/30/2020 on patients without AF or a prior permanent pacemaker. The primary endpoint was nPOAF postoperatively. ML techniques utilized included penalized logistic regression, gradient boosting, decision trees, and random forests. Results The overall incidence of nPOAF was 35.4% and that of new pacemaker insertion was 5.6%. Patients who developed nPOAF were older (67 ± 10 vs 60 ± 13 years), had more mitral valve stenosis (14.1% vs 11.7%), and hypertension (72.1% vs 63.3%). They underwent more mitral valve replacement (39.1% vs 32.7%) and coronary artery bypass grafting (23.9% vs 16%). For predicting nPOAF, ML methods offer sensitivity, specificity and precision superior to logistic regression. The accuracy rate was identical with penalized and non-penalized logistic regression (0.672). Conclusions Predicting nPOAF and its short-term sequelae following MV surgery remains highly challenging. Machine learning methods offer a moderate degree of improvement in predicting nPOAF even in large national-level studies, in the absence of multi-modal data, such as real-time wearables data, electrocardiograms, heart rhythm monitoring, or cardiac imaging.