Intelligent microgrid with different energy sources is considered as the next generation of power grid. For reliable and effective operation of this system, advanced communication and intelligent information processing techniques are required. In such a system, several electronic interfaced Distributed Generations (DGs) with local and global control loops are utilized. At DGs control systems, the primary control level is responsible for voltage and frequency regulation and maintaining microgrid stability. However, primary control may cause voltage and frequency deviation and it cannot guarantee zero voltage or frequency regulation errors. In this paper, to compensate these deviations, improve accuracy, global controllability and also to ensure reactive power sharing in the microgrid, a novel intelligent and distributed secondary control scheme is proposed, which is based on PI controller. To adaptively and optimally adjust PI controller parameters the Adaptive Neuro-Fuzzy Interface System (ANFIS) technique is used, which adjust PI controller coefficients according to microgrid operation conditions. The proposed ANFIS controller shows proper performance and acceptable response to different study cases.