  To gain a better understanding of the Andromeda galaxy M31 and its role in
the Local Group, measuring its mass precisely is essential. In this work, we
have constructed the rotation curve of M31 out to $\sim$125 kpc using 13,679
M31 objects obtained from various sources, including the LAMOST data release 9
(LAMOST DR9), the DESI survey, and relevant literature. We divide all objects
in our sample into bulge, disk and halo components. For the sources in the M31
disk, we have measured their circular velocities by a kinematic model with
asymmetric drift corrections. For the bulge and halo objects, we calculate
their velocity dispersions and use the spherical and projected Jeans equation
to obtain the circular velocities. Our findings indicate a nearly isotropic
nature for the M31 bulge, while the halo exhibits tangential anisotropy. The
results show that the rotation curve remains constant at $\sim$220 km s$^{-1}$
up to radius $\sim$25 kpc and gradually decreases to $\sim$170 km s$^{-1}$
further out. Based on the newly determined rotation curve, we have constructed
a mass distribution model for M31. Our measurement of the M31 virial mass is
$M_{\rm vir} = 1.14^{+0.51}_{-0.35} \times 10^{12} M_\odot$ within $r_{\rm vir}
= 220 \pm 25$ kpc.
