Objective: Magnetoacoustic imaging provides valuable information for monitoring bioelectricity and early tumor diagnosis. However, the low signal-to-noise ratio (SNR) of the magnetoacoustic signal, resulting from the single pulsed excitation, limits the imaging quality. A signal processing method of frequency coding excitation is proposed to increase the SNR of the magnetoacoustic signal. Methods: Chirp signal frequency coding is studied by simulation. M-sequence phase coding and wave averaging are also adopted in the studies. The experiments are conducted using a phantom of beef and fat with embedded copper rings. Two evaluation parameters, SNR improvement per unit pulse duration and SNR improvement per unit pulse duration per unit time, as well as the processing speed, are proposed to evaluate the SNR improvement. Results: The results show that the frequency coding approach can rapidly improve the SNR of the magnetoacoustic signal as well as phase coding excitation, compared with the wave averaging approach. Conclusions: A method of combining the coding and waveform averaging to improve the SNR of magnetoacoustic signal has been developed. A higher SNR improvement in the magnetoacoustic signal, up to 235x, with a short processing time of 0.867 s, can be obtained. Significance: This study provides an effective method to improve the SNR in magnetoacoustic imaging. (C) 2020 Elsevier Ltd. All rights reserved.