Sarcopenia is an age-related progressive skeletal muscle disorder involving the loss of muscle mass or strength and physiological function. Efficient and precise AI algorithms may play a significant role in the diagnosis of sarcopenia. In this study, we aimed to develop a machine learning model for sarcopenia diagnosis using clinical characteristics and laboratory indicators of aging cohorts. We developed models of sarcopenia using the baseline data from the West China Health and Aging Trend (WCHAT) study. For external validation, we used the Xiamen Aging Trend (XMAT) cohort. We compared the support vector machine (SVM), random forest (RF), eXtreme Gradient Boosting (XGB), and Wide and Deep (W&D) models. The area under the receiver operating curve (AUC) and accuracy (ACC) were used to evaluate the diagnostic efficiency of the models. The WCHAT cohort, which included a total of 4057 participants for the training and testing datasets, and the XMAT cohort, which consisted of 553 participants for the external validation dataset, were enrolled in this study. Among the four models, W&D had the best performance (AUC = 0.916 ± 0.006, ACC = 0.882 ± 0.006), followed by SVM (AUC =0.907 ± 0.004, ACC = 0.877 ± 0.006), XGB (AUC = 0.877 ± 0.005, ACC = 0.868 ± 0.005), and RF (AUC = 0.843 ± 0.031, ACC = 0.836 ± 0.024) in the training dataset. Meanwhile, in the testing dataset, the diagnostic efficiency of the models from large to small was W&D (AUC = 0.881, ACC = 0.862), XGB (AUC = 0.858, ACC = 0.861), RF (AUC = 0.843, ACC = 0.836), and SVM (AUC = 0.829, ACC = 0.857). In the external validation dataset, the performance of W&D (AUC = 0.970, ACC = 0.911) was the best among the four models, followed by RF (AUC = 0.830, ACC = 0.769), SVM (AUC = 0.766, ACC = 0.738), and XGB (AUC = 0.722, ACC = 0.749). The W&D model not only had excellent diagnostic performance for sarcopenia but also showed good economic efficiency and timeliness. It could be widely used in primary health care institutions or developing areas with an aging population. Chictr.org, ChiCTR 1800018895.