The invention provides a method for preparing 2,5-dimethylfuran by catalyzing 5-hydroxymethylfurfural. The method includes the following steps that firstly, 5-hydroxymethylfurfural is added into organic solvent to prepare a 5-hydroxymethylfurfural solution; secondly, the 5-hydroxymethylfurfural solution is catalyzed by means of a heterogeneous iron-based catalyst for hydrodeoxygenation, and 2,5-dimethylfuran is obtained. According to the method, catalytic active metal of the heterogeneous iron-based catalyst in use is iron, and compared with noble metal ruthenium, palladium, platinum and the like, cost is low; compared with other non-noble metal catalysts, the heterogeneous iron-based catalyst is easy to prepare and convenient to operate, and catalytic activity and selectivity are high; the catalyst is used for catalyzing 5-hydroxymethylfurfural (HMF) to prepare 2,5-dimethylfuran (DMF), an efficient environment-friendly method is provided for preparation of DMF, and the heterogeneous iron-based catalyst recycled after catalytic reaction can be repeatedly used.