The invention provides a building material and a preparation method thereof and relates to the field of construction. The building material comprises, by weight, 25 to 40 parts of yellow sand soil, 20 to 30 parts of expanded perlite, 25 to 30 parts of polyphenyl particles, 24 to 28 parts of polyurethane foam plastic, 20 to 30 parts of ash-calcium powder, 15 to 20 parts of quartz sand, 13 to 21 parts of bentonite, 15 to 25 parts of aluminum silicate, 11 to 15 parts of stearic acid, 5 to 9 parts of sodium formate, 8 to 14 parts of synthetic fibers, 5 to 7 parts of cement, 18 to 22 parts of electric furnace slag powder, 10 to 15 parts of a filler, 0.2 to 0.6 parts of a retarder, 0.3 to 0.5 parts of a water reducer and 4 to 6 parts of water. The preparation method comprises (1) raw material weighing, (2) polyurethane foamed plastic crushing, (3) stirring, and (4) molding, drying, cooling and storage. The building material solves the problem that the existing thermal insulation material has defects in buildings having high environmental protection, energy saving, sound insulation, tensile strength, compressive strength and heat preservation performance requirements.