The invention relates to the technical field of preparation of electronic components and devices and particularly relates to a method for preparing BCZT-based leadless piezoelectric ceramics. The method comprises the steps of dissolving citric acid in ethylene glycol, adding anhydrous ethanol diluted butyl titanate to obtain a compounding solution, dropwise adding a barium acetate solution, a calcium nitrate solution and a zirconium nitrate solution into the compounding solution, carrying out uniform mixing so as to obtain a BCZT-based polymer precursor, mixing NdFeB nano-powder with ferrum nano-powder so as to obtain magnetic powder slurry, mixing hard magnetic powder and core-shell structured ferrum/cobalt nano powder, then, carrying out high-speed dispersing treatment, and carrying outmold loading, spark plasma sintering and demolding, thereby obtaining the piezoelectric ceramics. Dense cobalt powder particles can be used for protecting ferrous powder from oxidation, tetrabutyl titanate reacts with citric acid to form a network structure, zirconium-calcium-barium titanate based materials are free of Pb and have little harm to human and environment, elemental cobalt will be slightly softened at high temperature, thus, the binding power of magnetic materials is enhanced, the coefficient of thermal conductivity of the magnetic materials is reduced, the magnetic materials can stably work in high-temperature environments, and the application prospect is broad.