To avoid the problem of the traditional methods consuming large computational resources to calculate the kernel matrix and 2D discrete convolution, we present a novel approach for 3D gravity and magnetic modelling. This method combines the midpoint quadrature method with a 2D fast Fourier transform (FFT) to calculate the gravity and magnetic anomalies with arbitrary density or magnetic susceptibility distribution. In this scheme, we apply the midpoint quadrature method to calculate the volume element of the integral. Then, the convolution of the weight coefficient matrix with density or magnetization is efficiently computed via the 2D FFT. Finally, the accuracy and efficiency of the proposed algorithm are validated by using an artificial model and a real topography model. The numerical results demonstrate that the proposed algorithm’s computation time and the memory requirement are decreased by approximately two orders of magnitude compared with the space-wavenumber domain method.