Thyroid cancer (TC) prone to cervical lymph node (CLN) metastasis both before and after surgery. Ultrasonography (US) is the first-line imaging method for evaluating the thyroid gland and CLNs. However, this assessment relies mainly on the subjective judgment of the sonographer and is very much dependent on the sonographer's experience. This prospective study was designed to construct a machine learning model based on contrast-enhanced ultrasound (CEUS) videos of CLNs to predict the risk of CLN metastasis in patients with TC. Patients who were proposed for surgical treatment due to TC from August 2019 to May 2020 were prospectively included. All patients underwent US of CLNs suspected of metastasis, and a 2-minute imaging video was recorded. After target tracking, feature extraction, and feature selection through the lymph node imaging video, three machine learning models, namely, support vector machine, linear discriminant analysis (LDA), and decision tree (DT), were constructed, and the sensitivity, specificity, and accuracy of each model for diagnosing lymph nodes were calculated by leave-one-out cross-validation (LOOCV). A total of 75 lymph nodes were included in the study, with 42 benign cases and 33 malignant cases. Among the machine learning models constructed, the support vector machine had the best diagnostic efficacy, with a sensitivity of 93.0%, a specificity of 93.8%, and an accuracy of 93.3%. The machine learning model based on US video is helpful for the diagnosis of whether metastasis occurs in the CLNs of TC patients.