We study the effect of accumulative payoff on the evolution of cooperation in the evolutionary prisoner's dilemma on a square lattice. We introduce a decaying factor for the accumulative payoff, which characterizes the extent that the historical payoff is accumulated. It is shown that for fixed values of the temptation to defect, the density of cooperators increases with the value of the decaying factor. This indicates that the more the historical payoff is involved, the more favourable cooperators become. In the critical region where the cooperator density converges to zero, cooperators vanish according to a power-law-like behaviour. The associated exponents agree approximately with the two-dimensional directed percolation and depend weakly on the value of the decaying factor.