B-spline functions play important roles in both mathematics and engineering. In this paper, we develop a numerical method for solving the boundary value problem of linear ODE with second-order by using B-spline. First, the cubic B-spline basis functions are introduced, and then we use the linear combination of cubic B-spline basis to approximate the solution. Finally, we obtain the numerical solution by solving tri-diagonal equations. The results are compared with finite difference method and linear shooting method through an example which shows that the B-spline method is feasible and efficient.