Thalassemia is one of the inherited hemoglobin disorders worldwide, resulting in ineffective erythropoiesis, chronic hemolytic anemia, compensatory hemopoietic expansion, hypercoagulability, etc., and when a mother carries the thalassemia gene, the child is more likely to have severe thalassemia. Furthermore, the economic and time costs of genetic testing for thalassemia prevent many thalassemia patients from being diagnosed in time. To solve this problem, we performed least absolute shrinkage and selection operator (LASSO) regression to analyze the correlation between thalassemia and blood routine indicators containing mean corpuscular volume (MCV), mean corpuscular hemoglobin (MCH), mean corpuscular hemoglobin concentration (MCHC), and red blood cell (RBC). We then built a nomogram to predict the occurrence of thalassemia, and receiver operating characteristic (ROC) curve was used to verify the prediction efficiency of this model. In total, we obtained 7,621 cases, including 847 thalassemia patients and 6,774 non-thalassemia. Among the 847 thalassemia patients, with a positivity rate of 67.2%, 569 cases were positive for α-thalassemia, and with a rate of 31.5%, 267 cases were positive for β-thalassemia. The remaining 11 cases were positive for both α- and β-thalassemia. Based on machine learning algorithm, we screened four optimal indicators, namely, MCV, MCH, RBC, and MCHC. The AUC value of MCV, MCH, RBC, and MCHC were 0.907, 0.906, 0.796, and 0.795, respectively. Moreover, the AUC value of the prediction model was 0.911. In summary, a novel and effective machine learning model was built to predict thalassemia, which functioned accurately, and may provide new insights for the early screening of thalassemia in the future.