The invention discloses anti-rust oil free of heavy metals. The anti-rust oil is prepared from, by weight, 1%-15% of a first anti-rust agent, 1%-10% of a second anti-rust agent, 5%-15% of a film-forming agent, 0.1%-5% of an antioxidant, 0.1%-5% of a preservative, 0.01%-2% of a defoaming agent, 0.01%-2% of essence and the balance modified vegetable oil. Components of the anti-rust oil do not contain heavy metals, the modified vegetable oil replaces mineral oil to serve as base oil, the modified vegetable oil is biodegradable and environment-friendly, the modified vegetable oil is not easy to oxidize, the antirust oil is good in stability and long in service life, and the first anti-rust agent and the second anti-rust agent have a synergistic effect, so that the antirust performance is good.