In this paper, a numerical method of a two-dimensional (2D) integro-differential equation with two fractional Riemann–Liouville (R-L) integral kernels is investigated. The compact difference method is employed in the spatial direction. The integral terms are approximated by a second-order convolution quadrature formula. The alternating direction implicit (ADI) compact difference scheme reduces the CPU time for two-dimensional problems. Simultaneously, the stability and convergence of the proposed ADI compact difference scheme are demonstrated. Finally, two numerical examples are provided to verify the established ADI compact difference scheme.