The new generation of wireless communication technology is expected to solve the reliability problem of communication in high-speed mobile communication scenarios. An orthogonal time frequency space (OTFS) system has been proposed and can effectively solve this problem. However, the pilot overhead and multiuser multiplexing overhead of the OTFS are relatively high. Therefore, a new modulation technology based on the discrete affine Fourier transform was proposed recently to address the above issues in OTFS, referred to the affine frequency division multiplexing (AFDM). The AFDM attains full diversity due to parameter adjustment according to the delay-Doppler profile of the channel and can achieve performance similar to the OTFS. Due to the limited research on the detection of AFDM currently, we propose a low-complexity yet efficient message passing (MP) algorithm for joint interference cancellation and detection, which takes advantage of the inherent channel sparsity. According to simulation results, the MP detection performs better than the minimum mean square error and maximal ratio combining detection.