The longitudinal zero-sequence voltage of generators contains a large amount of harmonics and inter-harmonics. Given that the conventional methods are not effective in filtering inter-harmonics, a new method is presented based on the frequency spectrum shifting principle. First, the fundamental frequency component is shifted to the origin point of the frequency axis, and then a very narrow-band low-pass filter is used to filter out non-direct-current components. The method can filter high order harmonics and mitigate inter-harmonics, therefore improve the performance of the generator longitudinal zero sequence voltage protection. A real-life event record indicates the method correct and efficient.