The invention discloses a steel rust inhibitor and a preparation method thereof. The preparation method comprises the following steps: weighing phytate, barium petroleum sulfonate, aluminum naphthenate, sodium tripolyphosphate, diethanolamine, surfactant, zinc dialkyl dithiophosphate, sodium molybdate, amino trimethylene phosphonic acid, tolyl triazole, thickener, acetyl triethyl citrate and deionized water according to parts by weight, adding into a middle, and starting the reaction kettle to stir at 65-70 DEG C until the components are completely dissolved. The steel rust inhibitor is free of harmful components to the human body, has the advantages of favorable rust inhibition property, simple treatment technique, accessible raw materials and low production cost, and is convenient to use. Under the condition of satisfying the operating conditions, the viscosity of the rust inhibitor should be reduced to the lowest value. The steel rust inhibitor with low viscosity is easy for coating, can effectively lower the thickness, and achieves the goals of saving and loss reduction.