We propose a reproducing kernel method for solving the KdV equation with initial condition based on the reproducing kernel theory. The exact solution is represented in the form of series in the reproducing kernel Hilbert space. Some numerical examples have also been studied to demonstrate the accuracy of the present method. Results of numerical examples show that the presented method is effective.