In this paper, we study the gradient estimate for positive solutions to the following nonlinear heat equation problem u(t) - Delta u = au log u + Vu, u > 0 on the compact Riemannian manifold (M, g) of dimension n and with non-negative Ricci curvature. Here a <= 0 is a constant, V is a smooth function on M with -Delta V <= A for some positive constant A. This heat equation is a basic evolution equation and it can be considered as the negative gradient heat flow to W-functional (introduced by G.Perelman), which is the Log-Sobolev inequalities on the Riemannian manifold and V corresponds to the scalar curvature.