The invention provides a method for preparing a ceramic coating through laser pyrolysis of a polysilazane precursor and a product obtained according to the method. According to the method, after being pretreated, a substrate is coated with or sprayed with the polysilazane organic polymer ceramic precursor; and then a coating is subjected to laser scanning under the protection of inert gas, ceramic conversion is achieved, and the ceramic coating is prepared and obtained. Compared with a traditional high-temperature sintering method, according to the method for preparing the ceramic coating, sintering is not needed, and thus energy consumption is reduced; laser energy is concentrated, the heat affected zone is small, the composition of a matrix phase is not affected, laser pyrolysis ceramic reaction is rapid, and accordingly the processing efficiency is high. The laser flexibility is good, the processing mode is flexible, and the obtained ceramic coating has high hardness, corrosion resistance and thermal shock resistance.