Objective: To construct a prediction model for fatty liver disease (FLD) among elderly residents in community using machine learning (ML) algorithms and evaluate its effectiveness. Methods: The physical examination data of 4989 elderly people (aged over 60 years) in a street of Shanghai from 2019 to 2023 were collected. The subjects were divided into a training set and a testing set in a 7:3 ratio. Using feature selection and importance sorting methods, eight indicators were selected, including high-density lipoprotein cholesterol, body mass index, uric acid, triglycerides, albumin, red blood cell, white blood cell, and alanine aminotransferase. Six ML models, including Categorical Features Gradient Boosting, eXtreme Gradient Boosting, Light Gradient Boosting Machine, Random Forest, Decision Tree, and Logistic Regression, were constricted, and their predictive performances were compared via accuracy, precision, recall, F1 score, and Area Under Receiver Operating Characteristic Curve. Results: Among the six ML models, the Categorical Features Gradient Boosting model demonstrated the highest prediction accuracy of 0.74 for FLD in elderly community population, along with a precision of 0.70, a recall of 0.73, a F1 score of 0.71, and an area under the curve of 0.74. Conclusions: In the context of rapid development of artificial intelligence, a community-based elderly FLD prediction model constructed using ML algorithms aid family general practitioners in the early diagnosis, early treatment, and health management of local FLD patients.