Crude oil is one of the world’s most important commodities. Its price can affect the global economy, as well as the economies of importing and exporting countries. As a result, forecasting the price of crude oil is essential for investors. However, crude oil price tends to fluctuate considerably during significant world events, such as the COVID-19 pandemic and geopolitical conflicts. In this paper, we propose a deep learning model for forecasting the crude oil price of one-step and multi-step ahead. The model extracts important features that impact crude oil prices and uses them to predict future prices. The prediction model combines convolutional neural networks (CNN) with long short-term memory networks (LSTM). We compared our one-step CNN–LSTM model with other LSTM models, the CNN model, support vector machine (SVM), and the autoregressive integrated moving average (ARIMA) model. Also, we compared our multi-step CNN–LSTM model with LSTM, CNN, and the time series encoder–decoder model. Extensive experiments were conducted using short-, medium-, and long-term price data of one, five, and ten years, respectively. In terms of accuracy, the proposed model outperformed existing models in both one-step and multi-step predictions.