BACKGROUND: Frailty may increase the risk of complications and mortality in patients undergoing cardiac surgery. Few studies on frailty and its associated factors have been conducted in these patients. OBJECTIVE: The aim of this study was to explore frailty and related factors in patients undergoing cardiac surgery. METHODS: A total of 154 patients undergoing cardiac surgery in northern Taiwan were recruited using a longitudinal study design and interviewed using structured questionnaires assessing physical activity, anxiety and depression, and social support before surgery and at 1 month and 3 months after surgery. RESULTS: The prevalence of frailty in patients undergoing cardiac surgery was 16.2%, 20.5%, and 16.6% before surgery and at 1 month and 3 months after surgery, respectively. Frail and prefrail patients undergoing cardiac surgery were more likely to be unemployed, have gout, have a higher New York Heart Association class, have preoperative dysrhythmia, undergo cardiopulmonary bypass, have a lower functional ability, have a higher European System for Cardiac Operative Risk Evaluation score, have a longer anesthesia time, have longer endotracheal tube and extracorporeal circulation times, have longer intensive care unit and hospital stays, have lower hemoglobin and albumin levels, have higher anxiety and depression levels, and have lower Mini-Mental State Examination scores. The significant predictors of prefrailty and frailty included unemployment, the presence of gout, higher New York Heart Association classes, less independence in activities of daily living, lower hemoglobin levels, and higher levels of depression. CONCLUSIONS: Frailty was associated with patients' functional status, perioperative conditions and psychosocial factors. Preoperative assessments of frailty and appropriate interventions are needed to improve frailty in patients undergoing cardiac surgery.