Grey wolf optimization algorithm (GWO) has achieved great results in the optimization of neural network parameters. However, it has some problems such as insufficient precision, poor robustness, weak searching ability and easy to fall into local optimal solution. Therefore, a grey wolf optimization algorithm combining Levy flight and nonlinear inertia weights (LGWO) is proposed in this paper. The combination of Levy flight and nonlinear inertia weight is to improve the search efficiency and solve the problem that the search ability is weak and it is easy to fall into the local optimal solution. In summary, LGWO solves the problems of insufficient precision, poor robustness, weak searching ability and easy to fall into local optimal. This paper uses Congress on Evolutionary Computation benchmark function and combines algorithms with neural network for power line fault classification prediction to verify the effectiveness of each strategy improvement in LGWO and its comparison with other excellent algorithms (sine cosine algorithm, tree seed algorithm, wind driven optimization, and gravitational search algorithm). In the combination of neural networks and optimization algorithms, the accuracy of LGWO has been improved compared to the basic GWO, and LGWO has achieved the best performance in multiple algorithm comparisons.