The invention discloses an anhydrous phosphating agent. The anhydrous phosphating agent is prepared from, by weight, 20 parts to 40 parts of phosphoric acid, 3 parts to 15 parts of polyvinyl butyral, 3 parts to 12 parts of silicone oil, 5 parts to 10 parts of sodium borate, 8 parts to 18 parts of resin, 3 parts to 14 parts of citric acid and 30 parts to 60 parts of organic solvents. A preparation method of the anhydrous phosphating agent includes the following steps that a, mixed liquid of polyvinyl butyral resin and the organic solvents is prepared; b, phosphoric acid and citric acid organic solvent mixed liquid is prepared; and c, mixing is performed, wherein the solutions obtained in the steps of a and b, silicone oil and sodium borate are mixed according to the formula, and the phosphating agent is prepared in a stirring manner. The phosphating agent is good in phosphating effect, small in sewage discharge amount, free of corrosivity, simple in preparation process and low in cost.