The invention discloses a dry film lubricant based on modified epoxy resin and characterized by comprising the following components: 100 to 120 parts of epoxy resin, 1 to 5 parts of inorganic nano-particles, 0.1 to 0.5 part of coupling agent, 20 to 60 parts of lubricant, 10 to 20 parts of anti-wear agent, 1 to 4 parts of dispersing agent, 10 to 30 parts of absolute alcohol and 0 to 20 parts of deionized water. The method for preparing the dry film lubricant comprises the following steps: firstly, carrying out surface modification on the inorganic nano-particles by the coupling agent; then, adding the modified inorganic nano-particles to the epoxy resin to obtain the modified water-based epoxy resin nano-emulsion; adding the dispersing agent to the mixture of the lubricant and the anti-wear agent drop by drop; then, adding the mixture to the modified water-based epoxy resin nano-emulsion, and evenly mixing; and further adding the deionized water to adjust the viscosity of coatings, thus obtaining the dry film lubricant based on the modified epoxy resin. The invention has the advantages of low emission of organic volatile substances, good frictional properties, strength, toughness, weather resistance, corrosion resistance and other overall properties and simple preparation process.