Natural gas has become the most widely used alternative energy for engines because of its low emission pollution and sufficient energy reserve. In order to improve the thermal efficiency of the natural gas engine, it is necessary to increase the compression ratio, but knock restricts the increase of the engine compression ratio. The main knock detection method of engine is to use knock sensor. However, the body vibration detected by the knock sensor contains a lot of interference noise, which brings bad effect on the accuracy of knock detection. Thus, in this paper, a knock recognition method based on wavelet transform (WT) and variational mode decomposition (VMD) algorithm is proposed to process the knock sensor signal and extract the knock feature. Based on the test bench of natural gas engine, experimental investigation of knock combustion characteristics was conducted by adjusting the spark timing, and simultaneously collects cylinder pressure signal and knock sensor signal. Burg algorithm based on Auto-regressive (AR) model was used to extract the knock characteristic frequency of the research engine. Then, wavelet transform and variational mode decomposition algorithm were employed to process the knock sensor signal to remove the interference noise and extract the knock feature. Maximum amplitude of pressure oscillation (MAPO) was selected as the knock intensity evaluation index of cylinder pressure signal. Then, taking the evaluation result of the knock intensity of cylinder pressure signal as reference, the root-mean-square of the knock characteristic signal was used as knock intensity evaluation index of knock sensor signal to determine the knock intensity classification of the knock sensor signal. The results show that the proposed method can effectively extract the knock feature from the knock sensor signal and realize the accurate engine knock recognition. The recognition accuracy is higher than the most existing knock recognition methods.