Provided in the present invention are a codon optimized OsrAAT inherited rice gene, related vector and method for preparing OsrAAT transgenic rice seeds and method for isolating and purifying OsrAAT. OsrAAT transgenic rice seeds are prepared by the specific expression of the expression vector of OsrAAT through the rice albuminous cell, from which OsrAAT is isolated and purified, the obtained OsrAAT having an HPLC purity of 97% and a yield of up to 18.89 ± 3.19%, thus corresponding to being able to produce 0.366 g of OsrAAT per kilogram of unrefined rice.