Lightning forecast is a prerequisite to realize active protection of lightning disaster in power grid. In order to further improve the forecast effect, this paper proposes a lightning forecast method based on Deep Neural Network. Firstly, a unified spatio-temporal grid is used to complete the normalization processing of lightning and meteorological data in Hubei province in 2020. Meteorological parameters strongly correlated with lightning activities are extracted by Chi-square unity test. Then, the ADASYN technique was used to over-sample the positive samples in the training set, and the DNN forecast model was trained with the probability of lightning occurrence as output, and the Bayesian algorithm was used to optimize the combination of hyper-parameters. Finally, the forecast results are verified with specific lightning trip records. The results show that the lightning forecast probability of detection, false alarm ratio and threaten score of the proposed method are 83.19%, 17.611 % and 70.40%, and the lightning trip early warning accuracy of UHV transmission lines is 81.8%. This method can be used for active protection of power network lightning fault based on forecast information, which is of great significance to reduce lightning disaster loss and improve lightning protection level of line.