The pipeline leakage detection and leak localization trouble is a highly demanding and dangerous issue. Underground pipelines are a critical mode of transporting enormous fluid volumes (e.g., water) across extended distances. Solving this problem will save the country much money and resources, but it will also protect the environment. On the other hand, present leak detection technologies are insufficient for monitoring underground pipelines due to the extreme subterranean environmental conditions. This study proposes a hybrid wireless sensor network based on TDR (time domain reflectometry) and magnetic induction for monitoring underground pipelines to solve these problems. In this scenario, TDR is deployed beneath an MI-based wireless sensor network. TDR precisely locates the leak and dramatically decreases the amount of time required for inspection. We offer a wireless sensor network based on MI technology for low-cost, real-time leak detection in subsurface pipes. MISE-PIPE identifies leaks by integrating data from a range of different types of sensors installed within and around underground pipelines. Ad-hoc WSNs are used to measure pressure. (WDNs) is a hot topic that has piqued researchers' interest in recent years. Time and accuracy are critical components of leak localization, as they substantially impact the human population and economy. Statistical classifiers acting in the residual space are offered as a general method for leak localization. Classifiers are trained on leak data from all network nodes, taking demand uncertainty, sensor preservative noise, and leak magnitude on the account. Following leak identification and localization, all monitoring data is forwarded to the CH using the K-means clustering method, which serves two critical functions: optimal clustering and prolonging the Network Lifetime (NL) and preserving the QoS. The clustering method is optimized using the K-Means approach .