The invention discloses a preparation method of dimethylmorphinan phosphate used as a cough medicine. The method comprises the following steps: removing L-mandelic acid from (S)-l-(4-methylbenzyl)-1,2,3,4,5,6,7,8-octahydroisoquinoline-L-mandelate to obtain (S)-l-(4-methylbenzyl)-1,2,3,4,5,6,7,8-octahydroisoquinoline, performing methylation by using the (S)-l-(4-methylbenzyl)-1,2,3,4,5,6,7,8-octahydroisoquinoline chiral material as a raw material, and then performing cyclization reaction together with phosphoric acid under the conditions of heating and decompression to obtain (9S,13S,14S)-3,17-dimethylmorphinan monophosphate with three chiral centers, namely dimethylmorphinan phosphate; and desalting, rectifying, crystallizing, salifying, drying, and packaging to obtain the refined dimethylmorphinan phosphate product. The method has the characteristics of simple process, low cost, high yield, high product purity, short production cycle and the like, thereby being a synthetic route suitable for industrial mass production.