In this paper, an adaptive generalized predictive control method based on adaptive-network-based fuzzy inference system (ANFIS) and switching control is proposed for a class of discrete-time nonlinear systems with unstable zero-dynamics. ANFIS is used to estimate and compensate the unmodeled dynamics, which overcomes the uncertainty of neural network and avoids the possibility that the network becomes trapped in local minima and so on. Furthermore, the method improves the convergence rate of the neural networks, the estimation precision of the unmodeled dynamic and the effectiveness of control. The analysis of stability and performance of the closed-loop system are established rigorously. Last, by comparing the simulation results, the effectiveness of the proposed method is illustrated.