The invention relates to an improved method of preparing a compound (II). The improved method comprises the following steps: (the formula is shown in the description) 1, mixing D-tryptophan, methanol and toluene, adding thionyl chloride dropwise, and then carrying out reaction at the temperature of 70-85 DEG C to obtain D-tryptophan ester hydrochloride, wherein the structure is shown in a formula (III):(the formula is shown in the specification); and 2, mixing the D-tryptophan ester hydrochloride, a compound (IV) and a nitrile solvent, uniformly stirring, then raising the temperature to 75-85 DEG C, and carrying out reaction, (the formula is shown in the description). The improved preparation method of the compound shown by the D-tryptophan ester hydrochloride (II) has the following beneficial effects: 1, the dosage of the thionyl chloride in the first step is greatly reduced, so that the risk and the corrosion of the reaction are lowered, the post-processing is simple, and the yield is above 90 percent; 2, in the second step, the nitrile solvent is adopted to improve the stereoselectivity, and the enantiomer extra amount (ee %) is above 99 percent.