B-spline functions play important roles in both mathematics and engineering. To describe 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, 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 through two examples which shows that the B-spline method is feasible and efficient.