The study of the dynamics of protein folding into its functional (native) state is one of the actual problems of molecular biology. For this, molecular dynamics simulations are widely used. The conditions under which the simulations are performed are important for the correct description of the folding process. In the present paper, we study the folding dynamics of one of the benchmark proteins (Trp-cage) under two conditions – the equilibrium conditions, when the protein repeatedly folds and unfolds, and under nonequilibrium conditions, when an ensemble of trajectories is generated that start in an unfolded sate of the protein and are terminated in the native state, which corresponds to the physiological conditions. It is shown that the behavior of the protein under these conditions is essentially different; in particular, in the case of nonequilibrium conditions an additional metastable state is formed, which leads to a separate folding pathway. The simulations have also shown that the kinetics of Trp-cage are two-state, which corresponds to the experimental results.