In this paper, a method to forecast the volatility of crude oil market based on text mining technology and deep learning model is proposed. First, the text mining technology is used to construct the textual features hidden in the news headlines of crude oil market, including the emotional polarity score, investor sentiment classification, and risk factors. Then the textual features with other features reflecting fluctuations of the crude oil market are combined as inputs of the deep learning long short‐term memory (LSTM) model for better forecasting results. Furthermore, the particle swarm optimization (PSO) is used to optimize the hyper‐parameters of the deep learning LSTM model to further improve the forecasting ability. The results in this study show that the LSTM model optimized by PSO algorithm has reduced 7.66%, 8.15%, 8.2%, 10.93%, and 23.46% on the mean absolute error (MAE) of crude oil volatility forecasting compared with other models. And it is more stable in multiple‐step forecasting results compared with the econometric model. In addition, compared with the PSO‐LSTM model without textual features, the forecasting accuracy of the PSO‐LSTM model with textual features has reduced by 6.77% and 5.12% in the MAE and the mean square error (MSE), respectively.