In this paper a nonmonotone limited memory BFGS (NLBFGS) method is applied for approximately solving optimal control problems (OCPs) governed by one-dimensional parabolic partial differential equations. A discretized optimal control problem is obtained by using piecewise linear finite element and well-known backward Euler methods. Afterwards, regarding the implicit function theorem, the optimal control problem is transformed into an unconstrained nonlinear optimization problem (UNOP). Finally the obtained UNOP is solved by utilizing the NLBFGS method. In comparison to other existing methods, the NLBFGS method shows a significant improvement especially for nonlinear and ill-posed control problems.