Growing concerns about health risks associated with poor indoor air quality, such as respiratory illnesses and allergies, highlight the need for improved management strategies. This study proposes a novel approach that combines an artificial neural network (ANN)-based indoor PM2.5 prediction model with a PM-priority control algorithm. This combined approach addresses the limitations of traditional methods by enabling proactive control measures based on predictive PM2.5 levels. With increased global attention to indoor air quality following the COVID-19 pandemic and the stringent 2021 WHO air quality guidelines, this research focuses on real-time management of PM2.5 and CO2 concentrations to maintain a healthy indoor environment. Two elementary school classrooms were equipped as living labs to analyze the performance of the developed system. The PM-priority control algorithm uses predictive data to dynamically regulate ventilation and air purification processes. Continuous retraining of the prediction model ensures adaptability to environmental changes by evaluating the algorithm’s efficiency in real time. The findings demonstrate that maintaining PM2.5 levels within comfortable ranges and reducing energy consumption can enhance the sustainability of buildings and improve the health and productivity of occupants. This approach provides a scalable solution applicable to schools and potentially other public buildings, emphasizing the preventive value of enhancing occupant health and productivity.