This paper introduces a new approach for training the adaptive network based fuzzy inference system (ANFIS). In this study, we apply one of the swarm intelligent branches, named artificial bee colony algorithm (ABC) for training. We use ABC for training the antecedent parameters and the conclusion parameters. The proposed method is applied to identification of the nonlinear system. The simulation results show that in comparison with genetic algorithm (GA), backpropagation (BP) and hybrid learning (HL) that is a combination of least-squares and backpropagation. The results show ABC optimizes ANFIS parameters are better than GA, BL and HL.