A fast algorithm is proposed for solving two-dimensional distributed-order time–space fractional diffusion equation where the solution has a weak singularity at initial time. The distributed-order fractional problem is firstly transformed into multi-term fractional problem by the Gauss–Legendre quadrature formula. Then the exponential-sum-approximation method on graded mesh is utilized to discretize time Caputo fractional derivatives in time direction, and a standard finite difference method is employed to approximate the spatial Riesz fractional derivatives. The scheme is proved to be α-robust convergent analytically. The discrete linear system possesses symmetric positive definite block-Toeplitz–Toeplitz-block structure and is efficiently solved by conjugate gradient method with the state-of-the-art sine-transformed based preconditioner. Numerical examples confirm the error analysis and the effectiveness of the preconditioner.