This work is executed to predict the variation in global temperature and greenhouse gas (GHG) emissions resulting from climate change and global warming, taking into consideration the natural climate cycle. A mathematical model was developed using a Recurrent Neural Network (RNN) with Long–Short-Term Memory (LSTM) model. Data sets of global temperature were collected from 800,000 BC to 1950 AD from the National Oceanic and Atmospheric Administration (NOAA). Furthermore, another data set was obtained from The National Aeronautics and Space Administration (NASA) climate website. This contained records from 1880 to 2019 of global temperature and carbon dioxide levels. Curve fitting techniques, employing Sin, Exponential, and Fourier Series functions, were utilized to reconstruct both NOAA and NASA data sets, unifying them on a consistent time scale and expanding data size by representing the same information over smaller periods. The fitting quality, assessed using the R-squared measure, ensured a thorough process enhancing the model's accuracy and providing a more precise representation of historical climate data. Subsequently, the time-series data were converted into a supervised format for effective use with the LSTM model for prediction purposes. Augmented by the Mean Squared Error (MSE) as the analyzed loss function, normalization techniques, and refined data representation from curve fitting the LSTM model revealed a sharp increase in global temperature, reaching a temperature rise of 4.8 °C by 2100. Moreover, carbon dioxide concentrations will continue to boom, attaining a value of 713 ppm in 2100. In addition, the findings indicated that the RNN algorithm (LSTM model) provided higher accuracy and reliable forecasting results as the prediction outputs were closer to the international climate models and were found to be in good agreement. This study contributes valuable insights into the trajectory of global temperature and GHG emissions, emphasizing the potential of LSTM models in climate prediction.