The selection of weight factors in the cost function is the focus and difficulty of predictive control, and the optimization of its weight factors becomes more important in the control of three-level inverter because it involves the control of current, midpoint potential and other nonlinear constraints. In this paper, an artificial neural network based model predictive control method for three-level inverter is given. First, a model predictive control strategy with midpoint potential and switching times constraints is proposed, and then the mapping relationship between weight factors and system performance is trained through the data obtained from simulation. Finally, the proposed method is validated by simulation experiments.