In this paper, we propose a novel algorithm for solving an optimal boundary control problem of the Burgers' equation. The solving method is based on the transformation of the original problem into a homogeneous boundary conditions problem. This transforms the original problem into an optimal distributed control problem. The modal expansion technique is applied to the distributed control problem of the Burgers' equation to generate a low-dimensional dynamical system. The control parametrization method is formulated for approximating the time-varying control by a finite term of the orthogonal functions with unknown coefficients determined through an optimization process. The minimization of the objective functional is performed by using a conjugate gradient method. The accuracy and convergent rate of this hybrid method are shown by some numerical examples.