The balancing of robotic systems is an important issue, because it allows significant reduction of torques. However, the literature review shows that the balancing of robotic systems is performed without considering the traveling trajectory. Although in static balancing the gravity effects on the actuators are removed, and in complete balancing the Coriolis, centripetal, gravitational, and cross-inertia terms are eliminated, but it does not mean that the required torque to move the manipulator from one point to another point is minimum. In this paper, “optimal spring balancing” is presented for open-chain robotic system based on indirect solution of open-loop optimal control problem. Indeed, optimal spring balancing is an optimal trajectory planning problem in which states, controls, and all the unknown parameters associated with the springs must be determined simultaneously to minimize the given performance index for a predefined point-to-point task. For this purpose, on the basis of the fundamental theorem of calculus of variations, the necessary conditions for optimality are derived that lead to the optimality conditions associated with Pontryagin's minimum principle and an additional condition associated with the constant parameters. The obtained optimality conditions are developed for a two-link manipulator in detail. Finally, the efficiency of the suggested approach is illustrated by simulation for a two-link manipulator and a PUMA-like robot. The obtained results show that the proposed method has dominant superiority over the previous methods such as static balancing or complete balancing.