With the rising impact and economic benefits of the online gaming industry, online gaming companies need to understand players’ behavior to evaluate their products better and adjust their developing strategy. This paper uses machine learning models to predict players’ online gaming behaviors. The study utilizes the dataset from Kaggle, which contains 40,034 samples with 13 features related to player demographics, game preferences, and gameplay behaviors. The primary objective is to classify two target variables: ‘EngagementLevel’ and ‘InGamePurchases.’ Data preprocessing steps included handling missing values, encoding categorical features, normalizing numerical data, and addressing class imbalances using the Synthetic Minority Over-sampling Technique (SMOTE). The Random Forests (RF) and Gaussian Naïve Bayes (GNB) models were employed to predict the target variables. The RF model significantly outperformed the GNB model in both classification tasks, especially when predicting the in-game purchases. The RF model’s robustness is attributed to its ability to handle complex, non-linear relationships and interactions between features, while the GNB model’s performance was limited by its assumptions of feature independence and normally distributed data. The findings suggest that RF is a more effective tool for predicting online gaming behaviors, particularly in scenarios with complex feature interactions. Future research could incorporate additional machine learning models and more diverse datasets to further enhance predictive accuracy and offer a more comprehensive understanding of online gaming behaviors.