Fossil fuels cause environmental and ecosystem problems. Hence, fossil fuels are replaced by nonpolluting, renewable, and clean energy sources such as wind energy. The stochastic and intermittent nature of wind speed makes it challenging to obtain accurate predictions. Long short term memory (LSTM) networks are proved to be reliable models for time series forecasting. Hence, an improved deep learning-based hybrid framework to forecast wind speed is proposed in this paper. The new framework employs a stacked autoencoder (SAE) and a stacked LSTM network. The stacked autoencoder extracts more profound and abstract features from the original wind speed dataset. Empirical tests are conducted to identify an optimal stacked LSTM network. The extracted features from the SAE are then transferred to the optimal stacked LSTM network for predicting wind speed. The efficiency of the proposed hybrid model is compared with machine learning models such as support vector regression, artificial neural networks, and deep learning based models such as recurrent neural networks and long short term memory networks. Statistical error indicators, namely, mean absolute error, root mean squared error, and R2, are adopted to assess the performance of the models. The simulation results demonstrate that the suggested hybrid model produces more accurate forecasts.