Wireless Sensor Network (WSN) contains several sensor nodules that are linked to each other wirelessly. Errors in WSN may perhaps be because of several causes which bring about hardware damage, power thwarts, incorrect sensor impression, faulty communication, sensor deficiencies, etc. This damages the network process. In this paper, we propose to develop a Hierarchical Fault Detection and Recovery Framework (HDFR) for Self-Healing WSN. This framework consists of three modules: Fault detection, fault confirmation and fault recovery. In fault detection module, Particle Swarm Optimization (PSO) algorithm is applied for estimating the discrete Round Trip Paths (RTPs). Along the established RTPs, round trip delay (RTD) time values are estimated. Then based on the RTD, the suspected nodes are identified. In fault confirmation module, the nodes are confirmed to be either in FAULTY or ACTIVE state. In fault recovery module, the primary controller (PC) will establish an alternate route via the secondary controllers (SC) by excluding the faulty nodes. Then, it will resend the stored packets to the sink via the newly established route. By experimental results, it is shown that the HDFR framework achieves better detection accuracy and packet delivery ratio.