This paper explores an inverse problem pertaining to the determination of a source function in non‐divergence parabolic equations, where the solution is known at a discrete set of points. Being different from other ordinary inverse source problems, which are often dependent on only one variable, the unknown coefficient in this paper not only depends on the space variable but also depends on the time . On the basis of the optimal control framework, the existence of the optimal solution of the control function is proved. The necessary conditions to be satisfied by the optimal solution are given. The convergence of the optimal solution when the mesh parameters tend to zero is obtained. The conjugate gradient method is applied to the inverse problem and some numerical results are presented for various typical test examples.