Air pollution is a pervasive environmental and public health concern, prompting the imperative development of predictive systems to facilitate proactive interventions. The complexity of predicting air pollution arises from intricate factors, including the accumulation of pollutants, traffic dynamics, and industrial emissions. Traditional methodologies, reliant on historical or real-time data analysis, often encounter limitations in providing comprehensive and accurate solutions to this multifaceted problem. To address the existing problem, we propose a novel fog-assisted decentralized air quality prediction and event detection system (DeepFogAQ) for managing air pollution of future cities. We integrate Deep Learning (DL), Fog Computing (FC), Complex Event Processing (CEP), and virtualization technologies within the architecture of DeepFogAQ. Specifically, for predicting pollutant concentrations, we employ Transformers, CNN-LSTM, GRU, and RFR models. Additionally, we construct Fog and Cloud layers based on container-based virtualization technology. To demonstrate the feasibility of the system, the developed ML/DL models were run on DeepFogAQ and alarm levels for future air quality were derived. In this way, both the success of the prediction models and the validity of the architecture were ensured. Experimental results showed that Transformers is the most successful model in air quality prediction and event detection. As a result, the proposed DeepFogAQ architecture has the potential to offer a powerful alternative to decision-makers to solve the air pollution problem with its decentralized, scalable, and fault-tolerant structure.