This paper improves the prediction accuracy of financial crisis of listed companies by optimizing the traditional Z-score model and taking the financial warning indicators as the input features of the neural network. The study selected the financial data of listed companies in a certain place from 2017 to 2023 as a sample, compared and analyzed the early warning performance of multiple traditional machine learning algorithms with this paper’s method, and assessed the reliability of this paper’s model in the early warning of financial quality by combining with cases. The neural network-based Zscore model has an AUC value of 0.914 on financial quality early warning, which is close to 1, and the prediction results are reliable. The model’s overall financial quality early warning accuracy in year t-1 is elevated by 16.61% to 19.35% compared with the comparison algorithm, and has a faster error has convergence speed. The Z-value calculation predicts that three companies will appear to have financial quality risk in 2017, which is consistent with the actual results. The algorithm of this paper predicts that company 9 has a Z-value of 3.79 in 2031, which may have financial quality risk. The results of this paper are reliable and show the early warning method of financial quality of listed companies in a new perspective, which is an important reference value for investors and managers.