Background: Cognitive decline shows heterogeneous with increasing age. The trajectory of cognitive function is yet to be fully investigated in older Chinese. Early identification of such trend is essential for the prevention of high-risk population related to cognitive decline. This study aimed to explore the heterogeneity and determinants of cognitive trajectories, and construct prediction models for distinguishing cognitive trajectories among the elderly Chinese at a community level.Methods: This study included 3502 older adults aged 65-105 years at their first observations in the Chinese Longitudinal Healthy Longevity Survey from 2002 to 2018. The Chinese version Mini-Mental State Examination (MMSE) was used for measuring cognitive function. The heterogeneity of cognitive trajectories was identified through mixed growth model, and the determinants of cognitive trajectories were analyzed by logistic regression. Under a consideration of feature selection, machine learning algorithms, namely logistic regression (LR), support vector machine (SVM), and an integrated algorithm combining LR and SVM (stacking), were used to predict cognitive trajectories using epidemiological variables. Area under the receiver operating characteristic curve (AUROC) and brier score were used to assess discrimination and calibration, respectively. Results: Two distinct cognitive trajectories were identified according to the changes of MMSE scores: stable-function (93.6%), and rapid-decline (6.4%). Older age, female gender, Han ethnicity, having no schooling, rural residents, low frequency leisure activities, and low baseline ADL score were associated with the rapid decline in cognitive function. For classification of two trajectories, the performance of LR, SVM and stacking algorithms with feature selection were comparable, of which achieved 0.66 of balanced accuracy, 0.74 of sensitivity, 0.73 of F1 score, 0.66 of AUROC, and 0.25 of brier score. Among the predictors, age and psychological well-being were the most effective variables for distinguishing two trajectories.Conclusions: Two cognitive trajectories were identified among older Chinese. The identified determinants of trajectories could be targeted for constructing early risk prediction models.