This article presents an intelligent algorithm-based fault detection scheme to improve the reliability and sustainability of a photovoltaic (PV) system. The PV systems are extremely susceptible to power grid transients and their operation may suffer drastically during faults located within the solar arrays, power electronics, and the inverter. Thus, it is significantly important to develop an intelligent mechanism to detect any type of fault or abnormalities at the shortest possible time and provide security for the solar system. In order to accomplish that, an adaptive neuro-fuzzy inference system (ANFIS) is developed to distinguish between normal, and faulty operation of a grid-connected PV system. A large dataset from real-time laboratory experiment using TBD125x125-36-P PV module, which includes the current, and voltage characteristic of PV is extracted, preprocessed and used in the training of the machine learning algorithm. The performance of the proposed intelligent fault detection scheme is also compared with other popular machine learning algorithms, where ANFIS have demonstrated outstanding results, with accuracy rate of 95.4%. Furthermore, the proposed technique is significantly more robust, straightforward, and requires less implementation time compared to other machine learning techniques such as, K nearest neighbor, decision tree, Naive Bayes, Ensemble, linear discriminant analysis, support vector machine, and finally neural network. Thus, the developed ANFIS based intelligent technique will enhance the reliability of the PV system through minimizing the maintenance cost, saving time and energy.