A transient analysis in time domain of beam-wave interaction for gyroklystron is made with self-consistent field theory in this paper. A nonlinear theory for gyroklystron with multiple cavities is established, but also electron motion equations and transient electromagnetic field equations in the complex form are given. Research methods of beam-wave interaction in input cavity, idler cavity and output cavity are investigated. The infuence of speedspread is taken into account. For a Kα-band gyroklystron with four cavities, some numerical results of beam-wave interaction are given, and analyzed in Fortran Language finally. The numerical results are compared with the experimental data and the PIC results, showing that they are in good agreement.