The anisotropic ray tracing equations of elastic waves are derived for calculating the central ray's travel time, trajectory, and parameters P and Q. Based on the anisotropic ray tracing algorithm, we proposed a transversely isotropic elastic dynamically focused beam migration for two dimensional media. Based on the two dimensional Kirchhoff-Helmholtz integral of elastic waves, the elastic imaging weight coefficients are used to reduce the crosstalk noise. Then, based on the previous research, we introduced a sign function to eliminate the effect of polarity reversal in qPqSV wave migration. Through model tests, it can be found that the proposed method can process the multicomponent seismic data and image the complex structures for anisotropic media. The optimized dynamic ray tracing algorithm is superior to the conventional one in computational efficiency. Furthermore, the proposed method eliminates the limitations of the Gaussian beam imaging. This method not only does not affect the accuracy of shallow imaging, but also enhances the energy focusing and the amplitude of deep layers. The model tests have shown the accuracy and effectiveness of our proposed method.