We numerically study the dynamics of vortex lattice formation in a rotating cigar-shaped BoseEinstein condensate. The study is a three-dimensional simulation of the Gross-Pitaevskii equation with a phenomenological dissipation term. The simulations reveal previously unknown dynamical features of the vortex nucleation process, in which the condensate undergoes a strongly turbulent stage and the penetrating vortex lines vibrate rapidly. The vibrations arise from spontaneous excitation of Kelvin waves on the proto-vortices during a surface wave instability, caused by an inhomogeneity of the condensate density along the elongated axial direction.PACS numbers: 03.75. Fi, 67.40.Db Atomic-gas Bose-Einstein condensates (BECs) provide a versatile testing ground for superfluidity, particularly in systems with an externally driven rotation. Several experimental groups have observed the formation of a lattice of quantized vortices in such a rotating BEC [1,2,3,4]. The experiment that largely motivates the present study is a direct observation of nonlinear dynamical phenomena such as vortex nucleation and lattice formation of a rotating BEC in real time [5]. There are some theoretical attempts to understand the dynamical properties of vortex lattice formation in this system [6,7,8,9,10,11,12]. Among these studies, the experimental observations are well reproduced by two-dimensional (2D) numerical simulations of the timedependent Gross-Pitaevskii equation (GPE) with a phenomenological dissipation term [7,8,9,13]. This paper presents the full three-dimensional (3D) dynamics of vortex lattice formation in a rotating BEC through the numerical simulations of the time-dependent GPE with a dissipation term. Except for a few preliminary works [6,11,12] and studies of the static configurations of vortices [14,15], this problem has been analyzed using only 2D simulations. In contrast to 2D simulations, a 3D simulation gives significant improvement for describing real 3D systems. For the present study, these improvements are (i) the 3D simulation includes the axial (z) component, which increases the number of degrees of freedom of the fluctuation modes, and (ii) the 3D simulation can treat observed physical phenomena associated with "vortex lines", such as bending [14], Kelvin waves (helical displacements of the vortex core) [16], and reconnection [17]. These features make the dynamical process of vortex lattice formation richer than that of the 2D case. Recently, Lobo et al. studied the 3D dynamics of rotating atomic-gas BECs using classical field theory in which the dynamics is described by the energy-conserving timedependent GPE and both the condensate wave function and its fluctuation modes are approximated by a single c-number field [11]. The dissipative process and the 3D vortex dynamics of a rotating BEC in a sphericallysymmetric trap was discussed in Ref. [12]. In our present study, we take account of the phenomenological dissipation so as to reproduce the entire vortex formation process that was observed in the experiments ...