The fault diagnosis in wireless sensor networks is one of the most important topics in the recent years of research work. The problem of fault diagnosis in wireless sensor network can be resembled with artificial immune system in many different ways. In this paper, a detection algorithm has been proposed to identify faulty sensor nodes using clonal selection principle of artificial immune system, and then the faults are classified into permanent, intermittent, and transient fault using the probabilistic neural network approach. After the actual fault status is detected, the faulty nodes are isolated in the isolation phase. The performance metrics such as detection accuracy, false alarm rate, false-positive rate, fault classification accuracy, false classification rate, diagnosis latency, and energy consumption are used to evaluate the performance of the proposed algorithm. The simulation results show that the proposed algorithm gives superior results as compared with existing algorithms in terms of the performance metrics. The fault classification performance is measured by fault classification accuracy and false classification rate. It has also seen that the proposed algorithm provides less diagnosis latency and consumes less energy than that of the existing algorithms proposed by Mohapatra et al, Panda et al, and Elhadef et al for wireless sensor network. KEYWORDS artificial immune system, clonal selection principle, fault diagnosis, probabilistic neural network, wireless sensor networks Int J Commun Syst. 2019;32:e4138.wileyonlinelibrary.com/journal/dac