Robotic manipulators that utilize the Cable-Pulley based Gravity Compensation Mechanism (CPGCM) have drawn increasing attention due to their exceptional features. In the current study, for the first time, the modeling and control of such systems will be addressed considering the flexibility of the cables. To this end, initially, the dominant dynamics of the cables are identified. Then, the Lagrangian of the whole robotic system including the flexibility of the cables is obtained and the system equations of motion are formed. To design the motion controller for the system, and suppress the vibrations stemmed from the inherent flexibility of the cables, the obtained dynamics is transformed into the standard form of the Singular Perturbation Theory (SPT). To achieve this goal, a combination of the inverse dynamics and Nonsingular Terminal Sliding Mode controller is designed, assuming the rigid model of the cable. A modifying term based on SPT is then added to the previous control signal to tackle the flexibility effects of the cables. The finite-time stability of the overall closed-loop controller is proven using Lyapunov’s direct method. The proposed controller is robust to deal with both structured and unstructured uncertainties of the system. The obtained results confirm that the presented robust control algorithm guarantees the stability of the closed-loop system in the finite time. Moreover, it is able to suppress the arisen vibration because of the inherent axial flexibility of the cables in various operational conditions.