In this paper, an inverse problem of determining an unknown source term in a time-fractional diffusion equation is investigated. This inverse problem is severely ill-posed. For this reason, a mollification technique is used to obtain a regularized problem. Afterwards, a finite difference marching scheme is introduced to solve this regularized problem. The stability of numerical solution is investigated. Finally, two numerical examples are presented to illustrate the validity and effectiveness of the proposed method.