The invention discloses a waterproof material for polystyrene boards and gypsum boards of building walls. The waterproof material is prepared from the following raw materials in parts by weight: 8-10parts of cement clinker, 6-10 parts of quick lime, 10-15 parts of a polyethylene emulsion, 15-20 parts of a paraffin emulsion, 4-8 parts of glass fibers, 3-6 parts of borax, 3-6 parts of sodium alginate, 3-5 parts of a grinding aid, 3-4 parts of sodium methyl silicate, 2-6 parts of hydroxyethyl cellulose, 2-4 parts of sodium tripolyphosphate, 2-4 parts of triethanolamine, 2-3 parts of aluminum potassium sulfate, 2-3 parts of dodecyl ethyoxyl sulphobetaine, 1-3 parts of polyacrylamide, 1-2 parts of calcium lignosulphonate and 50-80 parts of water. During construction, only 1mm of the material needs to be smeared on a polystyrene board wall body and a gypsum board wall body, after air drying, the surface layer of the wall surface is cleaned and polished to be flat, construction is convenient, time and labor are saved, the polystyrene board wall body and the gypsum board wall body treated through the material can completely eradicate the phenomena of alkali efflorescence, falling, moisture regain, mildewing and hollowing of the wall bodies, the service life of the polystyrene board and the gypsum board of the building wall body is greatly prolonged, and the cost is low.