The inverse problem of identifying the time-independent source term and initial value simultaneously for a time-fractional diffusion equation is investigated. This inverse problem is reformulated into an operator equation based on the Fourier method. Under a certain smoothness assumption, conditional stability is established. A standard Tikhonov regularisation method is proposed to solve the inverse problem. Furthermore, the convergence rate is given for an a priori and a posteriori regularisation parameter choice rule, respectively. Several numerical examples, including one-dimensional and two-dimensional cases, show the efficiency of our proposed method.