Recently, a 0.42 THz second-harmonic gyrotron with complex cavity has been investigated and measured in the Terahertz Research Center. The experimental results show that the designed gyrotron can operate stably at the candidate mode TE−17.4 with the pulsed power of 19.3 kW, corresponding to an efficiency of 8.6%. However, the measured output power and efficiency are much lower than the theoretical values. In this paper, the influences of beam quality and Ohmic loss on the beam-wave interaction in the designed complex-cavity gyrotron are analyzed explicitly by a nonlinear, time-dependent, multi-mode code. The numerical simulations show that in the low-beam-voltage region, the calculated powers perfectly fit with the experimental results when the electron beam width is 0.195 mm, the electron velocity spread is 6% and the Ohmic quality factor of TE−17.4 is about 75000. Meanwhile it is also found that competing modes are well suppressed although considering the beam quality and Ohmic loss, which reproduces the experimental observation of the high-power single-mode oscillation of the TE−17.4 mode as the design mode.