Traumatic cervical spinal cord injury (TCSCI) often causes varying degrees of motor dysfunction, common assessed by the International Standards for Neurological Classification of Spinal Cord Injury (ISNCSCI), in association with the American Spinal Injury Association (ASIA) Impairment Scale. Accurate prediction of motor function recovery is extremely important for formulating effective diagnosis, therapeutic and rehabilitation programs. The aim of this study is to investigate the validity of a novel nested ensemble algorithm that uses the very early ASIA motor score (AMS) of ISNCSCI examination to predict motor function recovery 6 months after injury in TCSCI patients. This retrospective study included complete data of 315 TCSCI patients. The dataset consisting of the first AMS at ≤ 24 h post-injury and follow-up AMS at 6 months post-injury was divided into a training set (80%) and a test set (20%). The nested ensemble algorithm was established in a two-stage manner. Support Vector Classification (SVC), Adaboost, Weak-learner and Dummy were used in the first stage, and Adaboost was selected as second-stage model. The prediction results of the first stage models were uploaded into second-stage model to obtain the final prediction results. The model performance was evaluated using precision, recall, accuracy, F1 score, and confusion matrix. The nested ensemble algorithm was applied to predict motor function recovery of TCSCI, achieving an accuracy of 80.6%, a F1 score of 80.6%, and balancing sensitivity and specificity. The confusion matrix showed few false-negative rate, which has crucial practical implications for prognostic prediction of TCSCI. This novel nested ensemble algorithm, simply based on very early AMS, provides a useful tool for predicting motor function recovery 6 months after TCSCI, which is graded in gradients that progressively improve the accuracy and reliability of the prediction, demonstrating a strong potential of ensemble learning to personalize and optimize the rehabilitation and care of TCSCI patients.