In this article, a new algorithm based on improved Legendre orthonormal basis for solving second-order BVPs is constructed. The method of this article is an improved Legendre orthogonal polynomial algorithm, and the epsilon-best approximate solution is constructed skillfully in the reproducing kernel space. Compared with other methods, this method has the advantages of high approximation, m-order convergence and strong stability. Some numerical examples show the effectiveness and stability of the algorithm. (C) 2020 Elsevier Ltd. All rights reserved.