The invention relates to an ammonia-free and ursol-free hair dye and a preparation method thereof. The hair dye consists of a component A and a component B, wherein the component A consists of dye mixture, alkanolamine substance, water-soluble inorganic salt, acrylate copolymer and derivants thereof or fatty alcohol, acid and fat and derivants thereof, heavy metal chelate, surfactant, alcohol substance, dimethyl silicone oil, lanolin, essence and plant extract; and the component B consists of hydrogen peroxide, fatty alcohol, acid and fat and derivants thereof, surfactant, viscosity and gel appearance modifier and phosphoric acid. The hair dye is prepared by a specific method, has no ursol which is easy to cause skin sensibility and no ammonia water which has stimulation to respiratory tract and has the characteristics of no toxicity, no pungent smell, convenient use and good effect.