The ionospheric state is becoming increasingly important to forecast for the reliable operation of terrestrial and space-based radio-communication systems which are influenced by ionospheric space weather. In this study, we have investigated and tested a multivariate long short-term memory (LSTM) deep learning model for its forecasting accuracy over different latitudinal regions during the solar quiet and solar active years. We also tested its prediction capability during the occurrence of a geomagnetic storm. Four stations qaq1 (60.7°N, 46.04°W), baie (49.18°N, 68.26°W), mas1 (27.76°N, 15.63°W), and bogt (4.64°N, 74.08°W) in the northern hemisphere were used in this study. To optimize the feature extraction process, we used heat map to find the correlation between TEC and the various exogenous parameters and finally nine correlated parameters were used as inputs to train the LSTM model. The performance of the LSTM model was validated by comparing it with the multilayer perceptron (MLP) machine learning algorithm using root mean square error (RMSE) and mean absolute error (MAE) as evaluation indices. The results showed an accuracy improvement of 70% and 64% over MLP during the solar quiet and active years, respectively. The prediction accuracy of our LSTM model was also 74% better than MLP during the geomagnetic storm event. These findings demonstrate the effectiveness of the developed LSTM model and the right selection of the exogenous parameters in estimating TEC, and suggest that this LSTM model can be used for short-term TEC forecasting.