An organic compound of dihexyl-contained triazine dithiol was specially synthesized for surface modification of magnesium alloy AZ91 in order to improve its corrosion resistance. The nano-scale polymer film on the surface of AZ91 was created with the synthesized compound by means of electrochemical measuring system called as polymer plating in the electrolytic solution. The modified surface of AZ91 had the peculiar functional characteristic of water repellency to inhibit corrosion. Corrosion tests were carried out with methods of polarization curve and electrochemical impedance. The corrosion resistance was evaluated from corrosive current density and reactive resistance. When concentration of the compound was set on 8 mol/m3, the good corrosion resistance was obtained for low corrosive current density and high reactive resistance in NaCl aqueous solution at 303K.