Pipelines are typically used to transport oil, natural gas, water, etc. It is one of the most effective methods for transferring fluids over long distances. However, long-term usage of these pipes without maintenance results in the formation of residues, which will pave the way for pipeline accidents and soil contamination. To ensure the safety and protection of resources, these sustainable pipelines need to be inspected to avoid losses. This work aims to investigate various internal defect leaks in the non-uniform thickness of sustainable water pipes that are joined with a pipe expander. The magnetic flux leakage technique was implemented to evaluate these defects by means of a flexible GMR sensor array. An inspection robot containing two units was fabricated with the aid of 3D printing. The power unit provides the necessary thrust to actuate the entire robot whereas the sensing unit is responsible for analyzing the leaks. The robot’s movement is predicted by the MPU6050 and ultrasonic distance sensors that are plotted as motion plots. The sensing unit consists of permanent magnets and a giant magnetoresistance (GMR) array to interrogate the flux leakage in the defect region. The flux leakage from the defects was stored with the help of an Arduino microcontroller, which controls the overall process. In addition, the spring suspension is provided to regulate the motion of the robot. The flux leakage from the defect region was plotted as waveform graphs. Thus, the results are effectively presented and compared. The calculated signal-to-noise ratio (SNR) of the magnetic flux leakages (MFLs) for 4.5 mm-thick pipe defects was 12 to 20.8 dB, and for 6.52 mm-thick pipe defects, it was 9.5 to 19 dB. In sum, the MFL technique provides a reliable method for the sustainable development of water supply to wide areas.