In smart cities, air pollution is a critical issue that affects individual health and harms the environment. The air pollution prediction can supply important information to all relevant parties to take appropriate initiatives. Air quality prediction is a hot area of research. The existing research encounters several challenges that is, poor accuracy and incorrect real‐time updates. This research presents a hybrid model based on long‐short term memory (LSTM), recurrent neural network (RNN), and Curiosity‐based Motivation method. The proposed model extracts a feature set from the training dataset using an RNN layer and achieves sequencing learning by applying an LSTM layer. Also, to deal with the overfitting issues in LSTM, the proposed model utilises a dropout strategy. In the proposed model, input and recurrent connections can be dropped from activation and weight updates using the dropout regularisation approach, and it utilises a Curiosity‐based Motivation model to construct a novel motivational model, which helps in the reconstruction of long short‐term memory recurrent neural network. To minimise the prediction error, particle swarm optimisation is implemented to optimise the LSTM neural network's weights. The authors utilise an online Air Pollution Monitoring dataset from Salt Lake City, USA with five air quality indicators for comparison, that is, SO2, CO, O3, and NO2, to predict air quality. The proposed model is compared with existing Gradient Boosted Tree Regression, Existing LSTM, and Support Vector Machine based Regression Model. Experimental analysis shows that the proposed method has 0.0184 (Root Mean Square Error (RMSE)), 0.0082 (Mean Absolute Error), 2002*109 (Mean Absolute Percentage Error), and 0.122 (R2‐Score). The experimental findings demonstrate that the proposed LSTM model had RMSE performance in the prescribed dataset and statistically significant superior outcomes compared to existing methods.