Water distribution systems (WDS) carry potable water with millions of miles of pipelines and deliver purified water to residential areas. The incidents in the WDS cause leak and water loss, which imposes pressure gradient and public health crisis. Hence, utility managers need to assess the condition of pipelines periodically and localize the leak location (in case it is reported). In our previous works, we designed and developed a size-adaptable modular in-pipe robot [1] and controlled its motion in in-service WDS. However, due to the linearization of the dynamical equations of the robot, the stabilizer controller which is a linear quadratic regulator (LQR) cannot stabilize the large deviations of the stabilizing states due to the presence of obstacles that fails the robot during operation. To this aim, we design a self-rescue mechanism for the robot in which three auxiliary gear-motors retract and extend the arm modules with the designed controller towards a reliable motion in the negotiation of large obstacles and non-straight configurations. Simulation results show that the proposed mechanism along with the motion controller enables the robot to have an improved motion in pipelines.