A network with sensor nodes has limited wireless computational power to process and transfer the live data to the base station or data collection center. Therefore, to increase the sensor area and the transmission area, the wireless sensor network usually contains many sensor nodes. In this paper a fault node recovery algorithm to improve the lifetime of a wireless sensor network when some of the sensor nodes shut down is proposed with unequal cluster-based Routing Protocol divides a network in clusters groups which gives good efficiency for fault node processing. The algorithm is based on the grade diffusion algorithm combined with the genetic algorithm .The algorithm can result in fewer replacements of sensor nodes and more reused routing paths. In our simulation, the proposed algorithm increases the number of active nodes, reduces the rate of data loss, and reduces the rate of energy consumption .The traditional approaches to sensor network routing include the directed diffusion (DD) algorithm and the grade diffusion (GD) algorithm. The algorithm proposed in this paper is based on the GD algorithm, with the goal of replacing fewer sensor nodes that are inoperative or have depleted batteries, and of reusing the maximum number of routing paths. These optimizations will ultimately enhance QOS parameters as well as the lifetime of sensor network.