In this paper, gear dynamics theory has been introduced into the torsional vibration calculation of the marine propulsion shafting. The vibration equations of a marine gearbox were established using an extended lumped parameter model through reasonably adjusting the parameters to get the natural frequency of marine gearbox shafting gear system. The solution of the equations shows that under normal condition, the natural frequency of gear meshing transmission is high and the gearbox itself will not affect the torsional resonance. Then a virtual prototype model of marine gearbox was built by the use of ADAMAS software. The simulation results show that the proposed method could reflect the actual torsional vibration correctly. Thus, the analysis method presented in this work is available for the torsional vibration calculation of the marine gearbox.