In a magnetic cusp gun, the canonical-angularmomentum (CAM) spread of the initially emitted electrons is crucial in generating substantial beam velocity spread. A new method called electron beam flow-feature compensation is proposed to build an axis-encircling electron beam with zero velocity spread by optimizing the cross-flow trajectories to compensate for the initial CAM spread. This method provides an effective solution to the velocity-spread problem in terahertz gyrotrons and increases the emission current to a level that is several times higher than the level that can be obtained using current technology.Index Terms-axis-encircling electron beam, electron cyclotron maser, harmonic operation, terahertz radiation