An improved conversion of thebaine to codeine was developed. Oxymercuration of thebaine with mercuric acetate in refluxing methanol, followed by hydrolysis of the intermediate 7-acetomercurineopinone dimethyl ketal with 3 N acetic acid, or, alternatively, reduction of the organomercury compound with sodium borohydride and mild acid hydrolysis of the resulting neopinone dimethyl ketal, gives neopinone in 95-100% yields. Either acid- or alkali-catalyzed isomerization to codeinone leads to the equilibrium mixture consisting of codeinone-neopinone, 3:1. Complete conversion to codenpinone in 85-90% yield results from treatment of neopinone with anhydrous HCl or HBr in ether-methylene chloride, followed by elimination of hydrogen halide from the intermediate 8-halodihydrocodeinone. The known borohydride reduction of codeinone then gives codeine in 85% overall yield from thebaine.