Abstract The chiral magnetic wave (CMW) is a collective mode in quark-gluon plasma originated from the chiral magnetic effect (CME) and chiral separation effect. Its detection in heavy-ion collisions is challenging due to significant background contamination. In Ref.~\cite{Zhao:2021yjo}, we have constructed a neural network which can accurately identify the CME-related signal from the final-state pion spectra. In this paper, we generalize such a neural network to the case of CMW search. We show that, after a updated training, the neural network can effectively recognize the CMW-related signal. Additionally, we assess the performance of the neural network compared to other known methods for CMW search.