A class D fire extinguishing agent is prepared by using the following components, by mass, 68-74% of sodium chloride, 5-8% of talcum powder, 7-10% of halogen-free flame retardant powder, 4.2-6% of white carbon black, 7-10% of calcium chloride, 1.2-1.7% of silicone oil and 0.3-0.7% of magnesium powder. A preparation method of the class D fire extinguishing agent comprises the following steps: respectively crushing sodium chloride, talcum powder, the halogen-free flame retardant powder, white carbon black and calcium chloride to form powders; and dehydrating sodium chloride, drying, mixing the dried sodium chloride with the talcum powder, the halogen-free flame retardant powder, the white carbon black and calcium chloride, and fully and uniformly mixing at a certain temperature, baking, adding the silicone oil, continuously baking, uniformly mixing, adding the magnesium powder, and uniformly stirring to prepare the finished extinguishing agent. In the invention, the above sodium salt is adopted as a main material, a small amount of the flame retardant is added, and the flame retardant, a catalyst and a metal substance in the sodium salt are effectively introduced and are finally effectively combined in order to effectively extinguish class D metal alkyl substance fires.