Air pollution, particularly from fine particulate matter (PM2.5), poses significant environmental and health threats. Accurately predicting PM2.5 concentrations can greatly assist policymakers in developing effective mitigation strategies. This research evaluates the performance of four popular machine learning models-Random Forest (RF), Gradient Boosting (GB), Support Vector Machine (SVM), and Multiple Linear Regression (MLR)-in predicting PM2.5 concentrations across several Nigerian cities: Abuja, Anyigba, Benin City, and Osogbo. The study utilized hourly PM2.5 data from the Center for Atmospheric Research (CAR) Nigeria's Purple Air Real-Time Air Quality Sensors Network and meteorological data from the HelioClim website of solar radiation and meteorological data services. Evaluation metrics included Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-squared (R2) to assess model performance. The results indicate that mean PM2.5 concentrations varied by location, with Benin City recording the highest levels of 46.19 mu g/m3 and Anyigba the lowest at 14.36 mu g/m3; higher levels were observed in the dry season across all locations. MAE values ranged from 2.25 mu g/m3 (RF in Anyigba) to 12.43 mu g/m3 (MLR in Benin City). The RF model consistently outperformed the others, achieving the highest R2 values (up to 0.89 in Anyigba) and the lowest RMSE (3.55 mu g/m3 in Anyigba). In contrast, the GB model demonstrated moderate performance with R2 values around 0.68, while the SVM model exhibited the lowest overall performance. Temperature has the highest average importance percentage across the selected locations, making it the best predictor. These findings underscore the effectiveness of the RF model for PM2.5 prediction and suggest that future research should explore the incorporation of additional gaseous pollutants, such as O3, NO2, and SO2, to enhance predictive capabilities.