Due to multiple comorbid illnesses, polypharmacy, and age-related changes in pharmacokinetics and pharmacodynamics in older adults, the prevalence of potentially inappropriate medications (PIMs) is high, which affects the quality of life of older adults. Building an effective warning model is necessary for the early identification of PIMs to prevent harm caused by medication in geriatric patients. The purpose of this study was to develop a machine learning-based model for the warning of PIMs in older Chinese outpatients. This retrospective study was conducted among geriatric outpatients in nine tertiary hospitals in Chengdu from January 2018 to December 2018. The Beers criteria 2019 were used to assess PIMs in geriatric outpatients. Three problem transformation methods were used to tackle the multilabel classification problem in prescriptions. After the division of patient prescriptions into the training and test sets (8:2), we adopted six widely used classification algorithms to conduct the classification task and assessed the discriminative performance by the accuracy, precision, recall, F1 scores, subset accuracy (ss Acc), and Hamming loss (hm) of each model. The results showed that among 11,741 older patient prescriptions, 5816 PIMs were identified in 4038 (34.39%) patient prescriptions. A total of 41 types of PIMs were identified in these prescriptions. The three-problem transformation methods included label power set (LP), classifier chains (CC), and binary relevance (BR). Six classification algorithms were used to establish the warning models, including Random Forest (RF), Light Gradient Boosting Machine (LightGBM), eXtreme Gradient Boosting (XGBoost), CatBoost, Deep Forest (DF), and TabNet. The CC + CatBoost model had the highest accuracy value (97.83%), recall value (89.34%), F1 value (90.69%), and ss Acc value (97.79%) with a good precision value (92.18%) and the lowest hm value (0.0006). Therefore, the CC + CatBoost model was selected to predict the occurrence of PIM in geriatric Chinese patients. This study’s novelty establishes a warning model for PIMs in geriatric patients by using machine learning. With the popularity of electronic patient record systems, sophisticated computer algorithms can be implemented at the bedside to improve medication use safety in geriatric patients in the future.