In this work, approximate analytical solution of the sine-Gordon equation with initial conditions is obtained by the homotopy analysis method (HAM). The HAM solutions contain an auxiliary parameter which provides a convenient way of controlling the convergence region of the series solutions. It is shown that the solutions obtained by the variational iteration method (VIM) are only special cases of the HAM solutions. 2008 Elsevier Inc. All rights reserved.