The dynamic triaxial test results of soft clay show that a long-term cyclic traffic load lead to significant deformation of soft clay. Considering that the dynamic triaxial test data of soft clay under cyclic loading have apparent time series characteristics, the long short-term memory (LSTM) model can be used to predict the deformation law of soft clay. Through a dynamic triaxial test of Shanghai soft clay, time series data, such as axial stress, pore water pressure, and axial strain were obtained to establish the sample data of the LSTM model. The LSTM model is then used to predict the axial strain development curve. The results showed that the LSTM model had a good fitting precision for the sample data under different dynamic stresses and frequencies, and its accuracy was above 97% in all conditions. The prediction results can reproduce the fluctuation law of the axial strain under cyclic loads and can be used to study elastic and plastic strains. The research results can provide technical support for disaster prevention and control in soft clay.