The invention discloses a runoff prediction method based on an attention mechanism and LSTM by using a deep learning algorithm. The method comprises the following steps: firstly, collecting influence characteristics related to runoff in a drainage basin, then constructing a time sequence data set corresponding to the characteristics and runoff, obtaining a runoff prediction model based on an attention mechanism and LSTM through training, and predicting the subsequent runoff according to the obtained runoff prediction model. Meanwhile, some short-term important features are ignored when the LSTM memorizes a long-term sequence mode, so that an attention mechanism is added, key elements in a runoff sequence are selectively concerned, the capability of capturing effective features by the LSTM is improved, and the prediction precision is relatively high. In addition, a deep learning method driven by data is used, dependence on a hydrological and physical mechanism in a drainage basin is reduced, and the application range of the model is effectively expanded.