In this letter, we propose an optimal recursive terminal sliding-mode control (ORTSMC) combined with super-twisting algorithm (STA) for a pump system under uncertainties. The main objective of the approach developed is to ensure rapid convergence of the pumping system with minimal power losses. To calculate the optimal input parameters of the pump system, a quantum particle swarm optimization algorithm (QPSO) is used. Next, we introduce a non-linear sliding variable into the cost function of the linear quadratic regulator (LQR). This proposal, along with the ORTSM manifold, aims to achieve fast convergence, dynamic stability, and minimize energy consumption. Additionally, the STA is employed to enhance performance during the reaching phase and reduce the chattering problem. The stability of the closed-loop control system is guaranteed using the Lyapunov theory. Finally, we conduct a comparative simulation analysis with two existing control schemes to demonstrate the superiority and effectiveness of our proposed control strategy.