Syphilis remains a serious public health problem in mainland China that requires attention, modelling to describe and predict its prevalence patterns can help the government to develop more scientific interventions. The seasonal autoregressive integrated moving average (SARIMA) model, long short-term memory network (LSTM) model, hybrid SARIMA-LSTM model, and hybrid SARIMA-nonlinear auto-regressive models with exogenous inputs (SARIMA-NARX) model were used to simulate the time series data of the syphilis incidence from January 2004 to November 2023 respectively. Compared to the SARIMA, LSTM, and SARIMA-LSTM models, the median absolute deviation (MAD) value of the SARIMA-NARX model decreases by 352.69%, 4.98%, and 3.73%, respectively. The mean absolute percentage error (MAPE) value decreases by 73.7%, 23.46%, and 13.06%, respectively. The root mean square error (RMSE) value decreases by 68.02%, 26.68%, and 23.78%, respectively. The mean absolute error (MAE) value decreases by 70.90%, 23.00%, and 21.80%, respectively. The hybrid SARIMA-NARX and SARIMA-LSTM methods predict syphilis cases more accurately than the basic SARIMA and LSTM methods, so that can be used for governments to develop long-term syphilis prevention and control programs. In addition, the predicted cases still maintain a fairly high level of incidence, so there is an urgent need to develop more comprehensive prevention strategies.