Based on the short-time dynamic scaling form, a novel dynamic approach is proposed to tackle numerically the Kosterlitz-Thouless phase transition. Taking the two-dimensional XY model as an example, the exponential divergence of the spatial correlation length, the transition temperature T KT and all critical exponents are computed. Compared with Monte Carlo simulations in equilibrium, we obtain data at temperatures nearer to T KT .