Tourism safety is the focus of the tourism industry. It is not only related to the safety of tourists’ lives and property, but also related to social stability and sustainable development of the tourism industry. However, the security early warning of many scenic spots focuses on the response measures and remedial plans after the occurrence of security incidents, and the staff of many scenic spots have limited security awareness and information analysis ability, which is prone to lag in information release, and do not pay attention to the information of potential security problems. Therefore, this paper studies the optimization algorithm of the tourism security early warning information system based on the LSTM model and uses the recurrent neural network and LSTM to improve the processing and prediction ability of time-series data. The experimental results show that the number of three hidden layers in the tourism security early warning information system based on the LSTM model can reduce the training time of the model and improve the performance. Compared with the tourism safety early warning information system based on the BP neural network, it has better accuracy and stability, has better processing and prediction ability for time series data, and can monitor and analyze data scientifically in real-time and dynamically analyze data.