Catalytic transfer hydrogenation/hydrogenolysis of 5-hydroxymethylfurfural (HMF) to valuable chemicals, 2,5-dimethylfuran (DMF), is realized over a carbon supported nickel-cobalt catalyst with formic acid as hydrogen donor. The highest DMF yield, 90.0%, is achieved at 210°C under self-generated pressure. A reaction route involving 5-methylfurfural (5-MF) instead of 2,5-bis(hydromethyl)furan (BHMF) as an intermediate has been investigated, which is different from that when H2 is used as hydrogen source in previous reports. The influence of the amount of formic acid is investigated on the conversion of HMF and the yield of DMF. The effectiveness of this strategy has also been used for the conversion of furfural to 2-methylfuran, another valuable chemicals.