In view of the financial risks faced by listed enterprises, how to accurately predict the risks is an important work. However, the traditional LSTM financial diagnosis model has the disadvantage of low accuracy; the specific reason is that the LSTM model has the problems of overfitting and gradient disappearance in risk diagnosis. Therefore, Dropout is adopted to solve the overfitting problem in the process of premodel prediction, and the BN algorithm is used to solve the gradient disappearance problem in the process of iteration. In order to verify the feasibility of above improvements, the financial data of China’s A-share listed enterprises from 2017 to 2020 are taken as samples to analyze the financial data of listed enterprises through single-step dimension and multistep dimension. The experimental results show that under the analysis of two dimensions, the financial prediction accuracy of the improved LSTM for T-2∼T-3 years can reach 83.96% and 91.19%, respectively, which indicates that through the above improvements, the model can be improved and has certain reference value.