In view of the data drift problem of MEMS gyroscope caused by vibration while drilling, a spiking neural network algorithm is proposed in this study. First, according to the time characteristics of the drift error of the gyroscope, the pulse time of the spiking neural network is used to encode the information intensity of the gyroscope. Then, the synaptic plasticity of the Izhikevich neuron model is used to adjust the excitatory synaptic conductance and inhibitory synaptic conductance to enhance the robustness of the network, thereby improving the anti-interference ability of the gyroscope signal against noise. Finally, under different vibration frequencies, the correlation between the firing rate of the Gaussian white noise output neuron and the membrane potential is analyzed. Experimental results show that under strong vibrations of different frequencies, noise has little effect on the firing rate of output neurons and the relative change of firing rate of output layer neurons, and has little effect on the membrane potential of output layer neurons, but has a greater impact on the correlation between membrane potentials. These results indicate that the proposed method improves the anti-interference ability of the gyroscope under vibration and noise, and can provide a new idea for the processing of gyroscope drift.