In active heave compensation, in order to realize the smooth control of the heave compensation platform, it is necessary to use the ship motion measurement system to accurately obtain the ship displacement signal, invert the ship displacement signal, and then control the expansion and contraction of the electric cylinder so that the compensation platform remains horizontal. The ship displacement measurement system generally adopts the second integral of the acceleration sensor to obtain the ship displacement signal. During the acquisition process of the ship displacement signal, the quadratic integration process of the acceleration, and the communication process of the output control command, there is a processing lag which makes the error accumulate, resulting in a delay in the measurement of the ship motion. In order to collect the ship motion more accurately and control the heave compensation platform more precisely, this paper proposes a ship motion prediction method based on a variable step-variable sampling frequency characteristic LSTM (Long Short-Term Memory) neural network. First, we use the autocorrelation function algorithm to calculate the inherent delay of the lag in the process of signal acquisition by the measurement system. Secondly, the LSTM neural network is used to predict the inherent delay step of the lagging ship displacement signal. During the prediction process, it is found that the difference in the sampling frequency of the displacement signal will lead to a change in the step of the inherent delay—experiment in the laboratory to verify. By controlling the motion platform to simulate the motion of the ship and using the ship motion measurement system and the laser sensor system to measure the displacement signal of the motion platform synchronously, it is verified that the ship motion measurement system does have an inherent delay. Thirdly, on a sailing ship, ship displacement signals are collected by setting multiple sets of ship motion measurement systems. Finally, multiple sets of sampling frequency and multiple steps are set, and the ship motion is predicted based on the variable step-variable sampling frequency LSTM neural network. It is verified that the prediction accuracy is related to the sampling frequency of the signal collector and the prediction step of the LSTM neural network, which improves the prediction accuracy of the model and the timeliness of ship motion acquisition.