In this work, a new algorithm is presented with regard to the free initial condition for solving optimal control problems. The reason for presentation of such an algorithm is to develop a suitable method that simplifies difficulties of the optimal control problems that researchers face in common methods of optimal control theory. Also, initial condition as true anomaly is considered to be free in this optimal control problem. To do so, issues such as optimal control theory, orthogonal functions in the Hilbert space, and evolutionary optimizations such as genetic algorithm-particle swarm optimization and imperial competition algorithm are utilized. The algorithm was solved for low-thrust orbital transfer problems which included nonlinear dynamic equations. To validate the algorithm, simplified Edelbaum low-thrust equations are compared with the proposed analytical solutions. Next, the algorithm is investigated for the low-thrust orbital transfers with respect to the equinoctial orbital equations of the minimum-time problem. Results are achieved for two evolutionary optimization methods genetic algorithm-particle swarm optimization and imperial competition algorithm and three orthogonal functions such as Fourier, Chebyshev, and Legendre. Two optimization methods and three orthogonal functions are covered and compared precisely. With respect to the results, this algorithm has the capability to overcome difficulties of the optimal control problems and can be considered as a novelty in this field for the free initial condition problems.