According to demand of the double anode magnetron injection gun for gyroklystron amplifier, many factors influencing electron gun performance, such as electrode shape, magnetic distribution, beam current, first anode voltage, second anode voltage, were discussed, The results show that the transverse to longitudinal velocity ratio of beam increases and the trans-velocity spread decreases when the first anode voltage increases or magnetic induction at the cathode decreases, when the first anode obliquity reduces and cathode obliquity increases, the transverse to longitudinal velocity ratio of beam increases and the trans-velocity spread will decrease. Quality of electron beam is improved by adjusting the distance between the cathode and the first anode and the first anode voltage properly. A