The invention discloses a method for predicting upstream and downstream water levels of a cascade power station, which includes the following steps: Step 1, selecting input variables and output variables; Step 2, standardizing the data to eliminate the influence of dimensions; Step 3, determining the input Vector dimension, LSTM layer number, output vector dimension, and time step; step 4, LSTM forward propagation process and error back propagation process; forward propagation process is input into LSTM network in sequence according to time step, and corresponding output value is obtained ; Using the sum of the squares of the error between the output value and the true value as the loss function, the error is backpropagated along time to update the parameters; step 5, use the trained model for multi-moment continuous prediction. Applying LSTM to the water level prediction of cascade power stations can capture the lagging influence information of upstream power stations on downstream power stations, improve prediction accuracy, and provide more reliable theoretical support for scientific scheduling decisions.