Background The incidence, prediction and mortality outcomes of intraoperative and postoperative cardiac arrest requiring cardiopulmonary resuscitation (CPR) in surgical patients are under investigated and have not been studied concurrently in a single study. Methods A retrospective cohort study was conducted using the American College of Surgeons National Surgical Quality Improvement Program data between 2008 and 2012. Firth’s penalized logistic regression was used to study the incidence and identify risk factors for intra- and postoperative CPR and 30-day mortality. simplified prediction model was constructed and internally validated to predict the studied outcomes. Results Among about 1.86 million non-cardiac operations, the incidence rate of intraoperative CPR was 0.03%, and for postoperative CPR was 0.33%. The 30-day mortality incidence rate was 1.25%. The incidence rate of events decreased overtime between 2008–2012. Of the 29 potential predictors, 14 were significant for intraoperative CPR, 23 for postoperative CPR, and 25 for 30-day mortality. The five strongest predictors (highest odd ratios) of intraoperative CPR were the American Society of Anesthesiologists (ASA) physical status, Systemic Inflammatory Response Syndrome (SIRS)/sepsis, surgery type, urgent/emergency case and anesthesia technique. Intraoperative CPR, ASA, age, functional status and end stage renal disease were the most significant predictors for postoperative CPR. The most significant predictors of 30-day mortality were ASA, age, functional status, SIRS/sepsis, and disseminated cancer. The predictions with the simplified five-factor model performed well and was comparable to the full prediction model. Postoperative cardiac arrest requiring CPR, compared to intraoperative, was associated with much higher mortality. Conclusions The incidence of cardiac arrest requiring CPR in surgical patients decreased overtime. Risk factors for intraoperative CPR, postoperative CPR and perioperative mortality are overlapped. We proposed a simplified approach compromised of five-factor model to identify patients at high risk. Postoperative, compare to intraoperative, cardiac arrest requiring CPR was associated with much higher mortality.