In this paper, a general five-step discrete-time Zhang neural network is proposed for time-varying nonlinear optimization (TVNO). First, based on the bilinear transform and Routh-Hurwitz stability criterion, we propose a general five-step third-order Zhang dynamic (ZeaD) formula, which is shown to be convergent with the truncation error O(tau(3)) with tau > 0 the sampling gap. Second, based on the designed ZeaD formula and the continuous-time Zhang dynamic design formula, a general five-step discrete-time Zhang neural network (DTZNN) model with quartic steady-state error pattern is presented for TVNO, which includes many multi-step DTZNN models as special cases. Third, based on the Jury criterion, we derive the effective domain of step size in the DTZNN model, which determines its convergence and convergence speed. Fourth, a nonlinear programming is established to determine the optimal step size. Finally, simulation results and discussions are given to validate the theoretical results obtained in this paper.