Provided is a method for preparing rebaudioside M by using an enzyme method. In the method, rebaudioside A or rebaudioside D is used as a substrate; and in the existence of a glucosyl donor, rebaudioside M is generated by means of reaction of the substrate under the catalysis of UDP-glucosyl transferase and/or recombinant cells containing the UDP-glucosyl transferase.